public static class CellComparatorImpl.MetaCellComparator extends CellComparatorImpl
CellComparatorImpl.MetaCellComparator
COMPARATOR, META_COMPARATOR
Constructor and Description |
---|
MetaCellComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Cell a,
Cell b,
boolean ignoreSequenceid)
Compare cells.
|
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() |
compare, compareColumns, compareFamilies, compareQualifiers, compareTimestamps, compareTimestamps, compareWithoutRow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInstance
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public int compareRows(Cell left, Cell right)
CellComparatorImpl
compareRows
in interface CellComparator
compareRows
in class CellComparatorImpl
left
- the left hand side cellright
- the right hand side cellpublic int compareRows(Cell left, byte[] right, int roffset, int rlength)
CellComparatorImpl
CellComparatorImpl.META_COMPARATOR
should be usedcompareRows
in interface CellComparator
compareRows
in class CellComparatorImpl
left
- the cell to be comparedright
- the kv serialized byte[] to be compared withroffset
- the offset in the byte[]rlength
- the length in the byte[]public int compare(Cell a, Cell b, boolean ignoreSequenceid)
CellComparator
compare
in interface CellComparator
compare
in class CellComparatorImpl
ignoreSequenceid
- True if we are to compare the key portion only and ignore
the sequenceid. Set to false to compare key and consider sequenceid.public Comparator getSimpleComparator()
getSimpleComparator
in interface CellComparator
getSimpleComparator
in class CellComparatorImpl
ByteBufferKeyValue
.
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.Copyright © 2007–2019 Cloudera. All rights reserved.