HBASE-9115 Addendum for server side fix (Ted Yu and Lars)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1510355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2013-08-04 23:17:20 +00:00
parent 3fa804eaf7
commit 2036dbb763
2 changed files with 2 additions and 6 deletions

View File

@ -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;
}

View File

@ -4672,6 +4672,7 @@ public class HRegion implements HeapSize { // , Writable{
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()) {