diff --git a/CHANGES.txt b/CHANGES.txt index 0499c9963c9..d5c5fa66483 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -77,6 +77,7 @@ Release 0.20.0 - Unreleased HBASE-1202 getRow does not always work when specifying number of versions HBASE-1324 hbase-1234 broke testget2 unit test (and broke the build) HBASE-1321 hbase-1234 broke TestCompaction; fix and reenable + HBASE-1330 binary keys broken on trunk (Ryan Rawson via Stack) IMPROVEMENTS HBASE-1089 Add count of regions on filesystem to master UI; add percentage diff --git a/src/java/org/apache/hadoop/hbase/KeyValue.java b/src/java/org/apache/hadoop/hbase/KeyValue.java index 3ff6c6da21e..aff47f429e4 100644 --- a/src/java/org/apache/hadoop/hbase/KeyValue.java +++ b/src/java/org/apache/hadoop/hbase/KeyValue.java @@ -612,10 +612,14 @@ public class KeyValue { public byte [] getKey() { int keylength = getKeyLength(); byte [] key = new byte[keylength]; - System.arraycopy(getBuffer(), ROW_OFFSET, key, 0, keylength); + System.arraycopy(getBuffer(), getKeyOffset(), key, 0, keylength); return key; } + public String getKeyString() { + return Bytes.toString(getBuffer(), getKeyOffset(), getKeyLength()); + } + /** * @return Key offset in backing buffer.. */ @@ -943,6 +947,11 @@ public class KeyValue { public KeyComparator getRawComparator() { return this.rawcomparator; } + + @Override + protected Object clone() throws CloneNotSupportedException { + return new RootComparator(); + } } /** @@ -955,6 +964,11 @@ public class KeyValue { public KeyComparator getRawComparator() { return this.rawcomparator; } + + @Override + protected Object clone() throws CloneNotSupportedException { + return new MetaComparator(); + } } /**