hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1510358 - in /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase: client/Append.java regionserver/HRegion.java
Date Sun, 04 Aug 2013 23:30:55 GMT
Author: tedyu
Date: Sun Aug  4 23:30:54 2013
New Revision: 1510358

URL: http://svn.apache.org/r1510358
Log:
HBASE-9115 Addendum (Ted and Lars)


Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/Append.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/Append.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/Append.java?rev=1510358&r1=1510357&r2=1510358&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/Append.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/Append.java Sun Aug 
4 23:30:54 2013
@@ -88,13 +88,7 @@ public class Append extends Mutation {
     if(list == null) {
       list = new ArrayList<KeyValue>();
     }
-    // find where the new entry should be placed in the List
-    int idx = 0;
-    for (KeyValue kv : list) {
-      if (Bytes.compareTo(qualifier, kv.getQualifier()) < 0) break;
-      idx ++;
-    }
-    list.add(idx, new KeyValue(
+    list.add(new KeyValue(
         this.row, family, qualifier, this.ts, KeyValue.Type.Put, value));
     familyMap.put(family, list);
     return this;

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1510358&r1=1510357&r2=1510358&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Sun
Aug  4 23:30:54 2013
@@ -5094,6 +5094,7 @@ public class HRegion implements HeapSize
             .entrySet()) {
 
           Store store = stores.get(family.getKey());
+          Collections.sort(family.getValue(), store.getComparator());
           List<KeyValue> kvs = new ArrayList<KeyValue>(family.getValue().size());
 
           // Get previous values for all columns in this family



Mime
View raw message