hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1510355 - in /hbase/trunk: hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Date Sun, 04 Aug 2013 23:17:21 GMT
Author: tedyu
Date: Sun Aug  4 23:17:20 2013
New Revision: 1510355

URL: http://svn.apache.org/r1510355
Log:
HBASE-9115 Addendum for server side fix (Ted Yu and Lars)


Modified:
    hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java?rev=1510355&r1=1510354&r2=1510355&view=diff
==============================================================================
--- hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java (original)
+++ hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Append.java Sun
Aug  4 23:17:20 2013
@@ -113,12 +113,7 @@ public class Append extends Mutation {
     // http://stackoverflow.com/questions/6474784/java-using-generics-with-lists-and-interfaces
     List<KeyValue> l = (List<KeyValue>)list;
     // find where the new entry should be placed in the List
-    int idx = 0;
-    for (KeyValue keyval : l) {
-      if (Bytes.compareTo(kv.getQualifier(), keyval.getQualifier()) < 0) break;
-      idx ++;
-    }
-    l.add(idx, kv);
+    l.add(kv);
     this.familyMap.put(family, list);
     return this;
   }

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1510355&r1=1510354&r2=1510355&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Sun Aug  4 23:17:20 2013
@@ -4672,6 +4672,7 @@ public class HRegion implements HeapSize
             Store store = stores.get(family.getKey());
             List<KeyValue> kvs = new ArrayList<KeyValue>(family.getValue().size());
   
+            Collections.sort((List<KeyValue>)family.getValue(), store.getComparator());
             // Get previous values for all columns in this family
             Get get = new Get(row);
             for (Cell cell : family.getValue()) {



Mime
View raw message