Class ReversedKeyValueHeap.ReversedKVScannerComparator
java.lang.Object
org.apache.hadoop.hbase.regionserver.KeyValueHeap.KVScannerComparator
org.apache.hadoop.hbase.regionserver.ReversedKeyValueHeap.ReversedKVScannerComparator
- All Implemented Interfaces:
Comparator<KeyValueScanner>
- Enclosing class:
- ReversedKeyValueHeap
private static class ReversedKeyValueHeap.ReversedKVScannerComparator
extends KeyValueHeap.KVScannerComparator
In ReversedKVScannerComparator, we compare the row of scanners' peek values first, sort bigger
one before the smaller one. Then compare the KeyValue if they have the equal row, sort smaller
one before the bigger one
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.regionserver.KeyValueHeap.KVScannerComparator
kvComparator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(KeyValueScanner left, KeyValueScanner right) int
compareRows
(Cell left, Cell right) Compares rows of two KeyValueMethods inherited from class org.apache.hadoop.hbase.regionserver.KeyValueHeap.KVScannerComparator
compare, getComparator
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
ReversedKVScannerComparator
Constructor
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<KeyValueScanner>
- Overrides:
compare
in classKeyValueHeap.KVScannerComparator
-
compareRows
Compares rows of two KeyValue- Returns:
- less than 0 if left is smaller, 0 if equal etc..
-