public static class KeyValue.KVComparator extends Object implements org.apache.hadoop.io.RawComparator<Cell>, KeyValue.SamePrefixComparator<byte[]>
| Constructor and Description |
|---|
KeyValue.KVComparator() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
calcIndexKey(byte[] lastKeyOfPreviousBlock,
byte[] firstKeyInBlock) |
protected Object |
clone() |
int |
compare(byte[] l,
int loff,
int llen,
byte[] r,
int roff,
int rlen) |
int |
compare(Cell left,
Cell right)
Compares the Key of a cell -- with fields being more significant in this order:
rowkey, colfam/qual, timestamp, type, mvcc
|
protected int |
compareColumns(byte[] left,
int loffset,
int llength,
int lfamilylength,
byte[] right,
int roffset,
int rlength,
int rfamilylength) |
int |
compareFlatKey(byte[] left,
byte[] right) |
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.
|
int |
compareIgnoringPrefix(int commonPrefix,
byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
Overridden
|
protected int |
compareRowKey(Cell left,
Cell right)
Compares the only the user specified portion of a Key.
|
int |
compareRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
Get the b[],o,l for left and right rowkey portions and compare.
|
int |
compareRows(KeyValue left,
KeyValue right) |
int |
compareTimestamps(KeyValue left,
KeyValue right) |
String |
getLegacyKeyComparatorName()
The HFileV2 file format's trailer contains this class name.
|
byte[] |
getShortMidpointKey(byte[] leftKey,
byte[] rightKey)
This is a HFile block index key optimization.
|
boolean |
matchingRowColumn(KeyValue left,
KeyValue right)
Compares the row and column of two keyvalues for equality
|
boolean |
matchingRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
Compare rows.
|
boolean |
matchingRows(KeyValue left,
KeyValue right)
Compares the row of two keyvalues for equality
|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic String getLegacyKeyComparatorName()
public int compare(byte[] l,
int loff,
int llen,
byte[] r,
int roff,
int rlen)
compare in interface org.apache.hadoop.io.RawComparator<Cell>protected int compareRowKey(Cell left, Cell right)
left - right - public int compareFlatKey(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
left - loffset - llength - right - roffset - rlength - public int compareFlatKey(byte[] left,
byte[] right)
public int compare(Cell left, Cell right)
compare in interface Comparator<Cell>public int compareRows(KeyValue left, KeyValue right)
left - right - public int compareRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
left - loffset - llength - right - roffset - rlength - protected int compareColumns(byte[] left,
int loffset,
int llength,
int lfamilylength,
byte[] right,
int roffset,
int rlength,
int rfamilylength)
public int compareIgnoringPrefix(int commonPrefix,
byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
compareIgnoringPrefix in interface KeyValue.SamePrefixComparator<byte[]>commonPrefix - left - loffset - llength - right - roffset - rlength - public boolean matchingRowColumn(KeyValue left, KeyValue right)
left - right - public boolean matchingRows(KeyValue left, KeyValue right)
left - right - public boolean matchingRows(byte[] left,
int loffset,
int llength,
byte[] right,
int roffset,
int rlength)
left - Left row array.loffset - Left row offset.llength - Left row length.right - Right row array.roffset - Right row offset.rlength - Right row length.public byte[] calcIndexKey(byte[] lastKeyOfPreviousBlock,
byte[] firstKeyInBlock)
public byte[] getShortMidpointKey(byte[] leftKey,
byte[] rightKey)
leftKey - rightKey - protected Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.