org.apache.hadoop.hbase
Class KeyValue.RawBytesComparator
java.lang.Object
org.apache.hadoop.hbase.KeyValue.KVComparator
org.apache.hadoop.hbase.KeyValue.RawBytesComparator
- All Implemented Interfaces:
- Comparator<Cell>, KeyValue.SamePrefixComparator<byte[]>, org.apache.hadoop.io.RawComparator<Cell>
- Enclosing class:
- KeyValue
public static class KeyValue.RawBytesComparator
- extends KeyValue.KVComparator
This is a TEST only Comparator used in TestSeekTo and TestReseekTo.
Method Summary |
byte[] |
calcIndexKey(byte[] lastKeyOfPreviousBlock,
byte[] firstKeyInBlock)
|
int |
compareFlatKey(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
Compares left to right assuming that left,loffset,llength and right,roffset,rlength are
full KVs laid out in a flat byte[]s. |
String |
getLegacyKeyComparatorName()
The HFileV2 file format's trailer contains this class name. |
Methods inherited from class org.apache.hadoop.hbase.KeyValue.KVComparator |
clone, compare, compare, compareColumns, compareFlatKey, compareIgnoringPrefix, compareKey, compareRowKey, compareRows, compareRows, compareTimestamps, getShortMidpointKey, matchingRowColumn, matchingRows, matchingRows |
KeyValue.RawBytesComparator
public KeyValue.RawBytesComparator()
getLegacyKeyComparatorName
public String getLegacyKeyComparatorName()
- The HFileV2 file format's trailer contains this class name. We reinterpret this and
instantiate the appropriate comparator.
TODO: With V3 consider removing this.
- Overrides:
getLegacyKeyComparatorName
in class KeyValue.KVComparator
- Returns:
- legacy class name for FileFileTrailer#comparatorClassName
compareFlatKey
public int compareFlatKey(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
- Description copied from class:
KeyValue.KVComparator
- Compares left to right assuming that left,loffset,llength and right,roffset,rlength are
full KVs laid out in a flat byte[]s.
- Overrides:
compareFlatKey
in class KeyValue.KVComparator
- Returns:
- 0 if equal, <0 if left smaller, >0 if right smaller
calcIndexKey
public byte[] calcIndexKey(byte[] lastKeyOfPreviousBlock,
byte[] firstKeyInBlock)
- Overrides:
calcIndexKey
in class KeyValue.KVComparator
Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.