Package org.apache.hadoop.hbase
Class InnerStoreCellComparator
java.lang.Object
org.apache.hadoop.hbase.CellComparatorImpl
org.apache.hadoop.hbase.InnerStoreCellComparator
- All Implemented Interfaces:
Serializable
,Comparator<Cell>
,CellComparator
Compare two HBase cells inner store, skip compare family for better performance. Important!!! we
should not make fake cell with fake family which length greater than zero inner store, otherwise
this optimization cannot be used.
- See Also:
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.CellComparatorImpl
COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected int
compareFamilies
(ByteBufferKeyValue left, int leftFamilyPosition, int leftFamilyLength, ByteBufferKeyValue right, int rightFamilyPosition, int rightFamilyLength) This method will be overridden when we compare cells inner store to bypass family comparing.protected int
compareFamilies
(Cell left, int leftFamilyLength, Cell right, int rightFamilyLength) This method will be overridden when we compare cells inner store to bypass family comparing.protected int
compareFamilies
(KeyValue left, int leftFamilyPosition, int leftFamilyLength, ByteBufferKeyValue right, int rightFamilyPosition, int rightFamilyLength) This method will be overridden when we compare cells inner store to bypass family comparing.protected int
compareFamilies
(KeyValue left, int leftFamilyPosition, int leftFamilyLength, KeyValue right, int rightFamilyPosition, int rightFamilyLength) This method will be overridden when we compare cells inner store to bypass family comparing.static CellComparator
getInnerStoreCellComparator
(byte[] tableName) Utility method that makes a guess at comparator to use based off passed tableName.static CellComparator
getInnerStoreCellComparator
(TableName tableName) Utility method that makes a guess at comparator to use based off passed tableName.Methods inherited from class org.apache.hadoop.hbase.CellComparatorImpl
compare, compare, compareColumns, compareFamilies, compareQualifiers, compareQualifiers, compareQualifiers, compareQualifiers, compareQualifiers, compareRows, compareRows, compareRows, compareTimestamps, compareTimestamps, compareWithoutRow, getCellComparator, getCellComparator, getSimpleComparator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.CellComparator
compareRows, compareRows
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
serialVersionUID
- See Also:
-
INNER_STORE_COMPARATOR
-
-
Constructor Details
-
InnerStoreCellComparator
public InnerStoreCellComparator()
-
-
Method Details
-
compareFamilies
Description copied from class:CellComparatorImpl
This method will be overridden when we compare cells inner store to bypass family comparing.- Overrides:
compareFamilies
in classCellComparatorImpl
-
compareFamilies
protected int compareFamilies(KeyValue left, int leftFamilyPosition, int leftFamilyLength, KeyValue right, int rightFamilyPosition, int rightFamilyLength) Description copied from class:CellComparatorImpl
This method will be overridden when we compare cells inner store to bypass family comparing.- Overrides:
compareFamilies
in classCellComparatorImpl
-
compareFamilies
protected int compareFamilies(ByteBufferKeyValue left, int leftFamilyPosition, int leftFamilyLength, ByteBufferKeyValue right, int rightFamilyPosition, int rightFamilyLength) Description copied from class:CellComparatorImpl
This method will be overridden when we compare cells inner store to bypass family comparing.- Overrides:
compareFamilies
in classCellComparatorImpl
-
compareFamilies
protected int compareFamilies(KeyValue left, int leftFamilyPosition, int leftFamilyLength, ByteBufferKeyValue right, int rightFamilyPosition, int rightFamilyLength) Description copied from class:CellComparatorImpl
This method will be overridden when we compare cells inner store to bypass family comparing.- Overrides:
compareFamilies
in classCellComparatorImpl
-
getInnerStoreCellComparator
Utility method that makes a guess at comparator to use based off passed tableName. Use in extreme when no comparator specified.- Returns:
- CellComparator to use going off the
tableName
passed.
-
getInnerStoreCellComparator
Utility method that makes a guess at comparator to use based off passed tableName. Use in extreme when no comparator specified.- Returns:
- CellComparator to use going off the
tableName
passed.
-