@InterfaceAudience.Private @InterfaceStability.Evolving public class MetaCellComparator extends CellComparatorImpl
| Modifier and Type | Field and Description |
|---|---|
static MetaCellComparator |
META_COMPARATOR
|
COMPARATOR| Constructor and Description |
|---|
MetaCellComparator() |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(Cell a,
Cell b,
boolean ignoreSequenceid)
Compare cells.
|
int |
compareRows(byte[] leftRow,
byte[] rightRow)
Compares two row bytes
|
int |
compareRows(ByteBuffer row,
Cell cell)
Lexicographically compare two rows
|
int |
compareRows(Cell left,
byte[] right,
int roffset,
int rlength)
Compares the row part of the cell with a simple plain byte[] like the stopRow in Scan.
|
int |
compareRows(Cell left,
Cell right)
Compares the rows of the left and right cell.
|
Comparator |
getSimpleComparator()
Return a dumbed-down, fast comparator for hbase2 base-type, the
ByteBufferKeyValue. |
compare, compareColumns, compareFamilies, compareQualifiers, compareTimestamps, compareTimestamps, compareWithoutRow, getCellComparator, getCellComparatorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInstancecomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic static final MetaCellComparator META_COMPARATOR
public int compareRows(Cell left, Cell right)
CellComparatorImplcompareRows in interface CellComparatorcompareRows in class CellComparatorImplleft - the left hand side cellright - the right hand side cellpublic int compareRows(Cell left, byte[] right, int roffset, int rlength)
CellComparatorImplMETA_COMPARATOR should be used the cell to be compared the kv
serialized byte[] to be compared with the offset in the byte[] the length in the byte[]compareRows in interface CellComparatorcompareRows in class CellComparatorImplleft - the cellright - the byte[] representing the row to be compared withroffset - the offset of the byte[]rlength - the length of the byte[]public int compareRows(byte[] leftRow,
byte[] rightRow)
CellComparatorleftRow - the byte array of the left rowrightRow - the byte array of the right rowpublic int compare(Cell a, Cell b, boolean ignoreSequenceid)
CellComparatorcompare in interface CellComparatorcompare in class CellComparatorImplignoreSequenceid - True if we are to compare the key portion only and ignore the
sequenceid. Set to false to compare key and consider sequenceid.public int compareRows(ByteBuffer row, Cell cell)
CellComparatorrow - ByteBuffer that wraps a row; will read from current position and will reading all
remaining; will not disturb the ByteBuffer internal state.public Comparator getSimpleComparator()
CellComparatorByteBufferKeyValue.
Create an instance when you make a new memstore, when you know only BBKVs will be passed. Do
not pollute with types other than BBKV if can be helped; the Comparator will slow.getSimpleComparator in interface CellComparatorgetSimpleComparator in class CellComparatorImplCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.