gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fe...@apache.org
Subject svn commit: r1359126 - in /gora/trunk: CHANGES.txt gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java
Date Mon, 09 Jul 2012 12:53:52 GMT
Author: ferdy
Date: Mon Jul  9 12:53:52 2012
New Revision: 1359126

URL: http://svn.apache.org/viewvc?rev=1359126&view=rev
Log:
GORA-146 HBaseStore does not properly set endkey

Modified:
    gora/trunk/CHANGES.txt
    gora/trunk/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java

Modified: gora/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/gora/trunk/CHANGES.txt?rev=1359126&r1=1359125&r2=1359126&view=diff
==============================================================================
--- gora/trunk/CHANGES.txt (original)
+++ gora/trunk/CHANGES.txt Mon Jul  9 12:53:52 2012
@@ -6,6 +6,8 @@ Gora Change Log
 
 0.3 (trunk) Current Development:
 
+* GORA-146 HBaseStore does not properly set endkey (ferdy)
+
 * GORA-140 Requires some adjustments on dependency at gora-cassandra (kazk, lewismc)
 
 * GORA-138 gora-cassandra array type support: Double fix for GORA-81 Replace CassandraStore#addOrUpdateField
with TypeInferringSerializer to take advantage of when the value is already of type ByteBuffer.
(Kazuomi Kashii via lewismc)

Modified: gora/trunk/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java?rev=1359126&r1=1359125&r2=1359126&view=diff
==============================================================================
--- gora/trunk/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java (original)
+++ gora/trunk/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java Mon Jul
 9 12:53:52 2012
@@ -325,13 +325,13 @@ implements Configurable {
           (stopRow.length == 0 ||
               Bytes.compareTo(stopRow, keys.getFirst()[i]) > 0)) {
 
-        byte[] splitStart = (startRow.length == 0 ||
-          Bytes.compareTo(keys.getFirst()[i], startRow) >= 0) ?
+        byte[] splitStart = startRow.length == 0 || 
+            Bytes.compareTo(keys.getFirst()[i], startRow) >= 0 ? 
             keys.getFirst()[i] : startRow;
 
-        byte[] splitStop = (stopRow.length == 0 ||
-            Bytes.compareTo(keys.getSecond()[i], stopRow) <= 0) ?
-            keys.getSecond()[i] : stopRow;
+        byte[] splitStop = (stopRow.length == 0 || 
+            Bytes.compareTo(keys.getSecond()[i], stopRow) <= 0) && 
+            keys.getSecond()[i].length > 0 ? keys.getSecond()[i] : stopRow;
 
         K startKey = Arrays.equals(HConstants.EMPTY_START_ROW, splitStart) ?
             null : HBaseByteInterface.fromBytes(keyClass, splitStart);



Mime
View raw message