hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r930137 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowSpec.java
Date Thu, 01 Apr 2010 23:35:04 GMT
Author: apurtell
Date: Thu Apr  1 23:35:04 2010
New Revision: 930137

URL: http://svn.apache.org/viewvc?rev=930137&view=rev
Log:
HBASE-2402 [stargate] set maxVersions on gets

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowSpec.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=930137&r1=930136&r2=930137&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Thu Apr  1 23:35:04 2010
@@ -70,7 +70,6 @@ Release 0.20.4 - Unreleased
    HBASE-2365  Double-assignment around split
    HBASE-2398  NPE in HLog.append when calling writer.getLength
                (Kannan Muthukkaruppan via Stack)
-            
 
   IMPROVEMENTS
    HBASE-2180  Bad read performance from synchronizing hfile.fddatainputstream
@@ -95,7 +94,8 @@ Release 0.20.4 - Unreleased
    HBASE-2174  Stop from resolving HRegionServer addresses to names using DNS
                on every heartbeat (Karthik Ranganathan via Stack)
    HBASE-2327  [EC2] Allocate elastic IP addresses for ZK and master nodes
-   HBASE-2147  run zookeeper in the same jvm as master during non-distributed mode
+   HBASE-2147  run zookeeper in the same jvm as master during non-distributed
+               mode
    HBASE-2340  Add end-to-end test of sync/flush
    HBASE-2389  HTable - delete / put unnecessary sync (Kay Kay via Stack)
    HBASE-2385  Debug Message "Received report from unknown server" should be
@@ -120,6 +120,7 @@ Release 0.20.4 - Unreleased
    HBASE-2319  [stargate] multiuser mode: request shaping
    HBASE-2349  Backport HBaseTestingUtility to branch (will include adding
                support for junit4 to branch)
+   HBASE-2402  [stargate] set maxVersions on gets
 
 Release 0.20.3 - January 25th, 2010
   INCOMPATIBLE CHANGES

Modified: hadoop/hbase/branches/0.20/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowSpec.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowSpec.java?rev=930137&r1=930136&r2=930137&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowSpec.java
(original)
+++ hadoop/hbase/branches/0.20/src/contrib/stargate/src/java/org/apache/hadoop/hbase/stargate/RowSpec.java
Thu Apr  1 23:35:04 2010
@@ -36,6 +36,8 @@ import org.apache.hadoop.hbase.util.Byte
 public class RowSpec {
   public static final long DEFAULT_START_TIMESTAMP = 0;
   public static final long DEFAULT_END_TIMESTAMP = Long.MAX_VALUE;
+  
+  private static final String versionPrefix = "?v=";
 
   private byte[] row = HConstants.EMPTY_START_ROW;
   private byte[] endRow = null;
@@ -53,6 +55,7 @@ public class RowSpec {
     i = parseRowKeys(path, i);
     i = parseColumns(path, i);
     i = parseTimestamp(path, i);
+    i = parseMaxVersions(path, i);
   }
 
   private int parseRowKeys(final String path, int i)
@@ -198,6 +201,15 @@ public class RowSpec {
     return i;
   }
 
+  private int parseMaxVersions(final String path, int i) {
+    String s = path.substring(i);
+    if (s.startsWith(versionPrefix)) {
+      this.maxVersions = Integer.valueOf(s.substring(versionPrefix.length()));
+      i += s.length();
+    }
+    return i;
+  }
+
   public RowSpec(byte[] startRow, byte[] endRow, byte[][] columns,
       long startTime, long endTime, int maxVersions) {
     this.row = startRow;



Mime
View raw message