HBASE-2753 Remove sorted() methods from Result now that Gets are Scans

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1027293 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Rawson 2010-10-25 22:56:47 +00:00
parent e3c5654626
commit a702d2253c
2 changed files with 3 additions and 12 deletions

View File

@ -612,7 +612,7 @@ Release 0.21.0 - Unreleased
HBASE-3139 Server shutdown processor stuck because meta not online
HBASE-3136 Stale reads from ZK can break the atomic CAS operations we
have in ZKAssign
HBASE-2753 Remove sorted() methods from Result now that Gets are Scans
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -159,7 +159,7 @@ public class Result implements Writable {
if(this.kvs == null) {
readFields();
}
return isEmpty()? null: Arrays.asList(sorted());
return isEmpty()? null: Arrays.asList(raw());
}
/**
@ -172,18 +172,9 @@ public class Result implements Writable {
* @deprecated
*/
public KeyValue[] sorted() {
raw(); // side effect of loading this.kvs
if (!sorted) {
assert Ordering.from(KeyValue.COMPARATOR).isOrdered(Arrays.asList(kvs));
Arrays.sort(kvs, KeyValue.COMPARATOR);
sorted = true;
return raw(); // side effect of loading this.kvs
}
return raw();
}
private boolean sorted = false;
/**
* Return the KeyValues for the specific column. The KeyValues are sorted in
* the {@link KeyValue#COMPARATOR} order. That implies the first entry in