HBASE-1330 binary keys broken on trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@766600 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-04-20 07:10:45 +00:00
parent 8aeb808e00
commit 07bf1b5c44
2 changed files with 16 additions and 1 deletions

View File

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

View File

@ -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();
}
}
/**