@InterfaceAudience.Private public class ReversedKeyValueHeap extends KeyValueHeap
KeyValueScanner.backwardSeek(org.apache.hadoop.hbase.KeyValue)), and it will jump to the previous row
if it is already at the end of one row when calling next().KeyValueHeap.KVScannerComparatorcomparator, current, heap| Constructor and Description |
|---|
ReversedKeyValueHeap(List<? extends KeyValueScanner> scanners,
KeyValue.KVComparator comparator) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
backwardSeek(KeyValue seekKey)
Seek the scanner at or before the row of specified KeyValue, it firstly
tries to seek the scanner at or after the specified KeyValue, return if
peek KeyValue of scanner has the same row with specified KeyValue,
otherwise seek the scanner at the first KeyValue of the row which is the
previous row of specified KeyValue
|
KeyValue |
next()
Return the next KeyValue in this scanner, iterating the scanner
|
boolean |
requestSeek(KeyValue key,
boolean forward,
boolean useBloom)
Similar to
KeyValueScanner.seek(org.apache.hadoop.hbase.KeyValue) (or KeyValueScanner.reseek(org.apache.hadoop.hbase.KeyValue) if forward is true) but only
does a seek operation after checking that it is really necessary for the
row/column combination specified by the kv parameter. |
boolean |
reseek(KeyValue seekKey)
This function is identical to the
KeyValueHeap.seek(KeyValue) function except
that scanner.seek(seekKey) is changed to scanner.reseek(seekKey). |
boolean |
seek(KeyValue seekKey)
Seeks all scanners at or below the specified seek key.
|
boolean |
seekToLastRow()
Seek the scanner at the first KeyValue of last row
|
boolean |
seekToPreviousRow(KeyValue seekKey)
Seek the scanner at the first KeyValue of the row which is the previous row
of specified key
|
close, getHeap, getSequenceID, next, next, peek, pollRealKVdoRealSeek, enforceSeek, isFileScanner, realSeekDone, shouldUseScannerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitenforceSeek, isFileScanner, realSeekDone, shouldUseScannerpublic ReversedKeyValueHeap(List<? extends KeyValueScanner> scanners, KeyValue.KVComparator comparator) throws IOException
scanners - comparator - IOExceptionpublic boolean seek(KeyValue seekKey) throws IOException
KeyValueHeapAs individual scanners may run past their ends, those scanners are automatically closed and removed from the heap.
This function (and KeyValueHeap.reseek(KeyValue)) does not do multi-column
Bloom filter and lazy-seek optimizations. To enable those, call
KeyValueHeap.requestSeek(KeyValue, boolean, boolean).
seek in interface KeyValueScannerseek in class KeyValueHeapseekKey - KeyValue to seek at or afterIOExceptionpublic boolean reseek(KeyValue seekKey) throws IOException
KeyValueHeapKeyValueHeap.seek(KeyValue) function except
that scanner.seek(seekKey) is changed to scanner.reseek(seekKey).reseek in interface KeyValueScannerreseek in class KeyValueHeapseekKey - seek value (should be non-null)IOExceptionpublic boolean requestSeek(KeyValue key, boolean forward, boolean useBloom) throws IOException
KeyValueHeapKeyValueScanner.seek(org.apache.hadoop.hbase.KeyValue) (or KeyValueScanner.reseek(org.apache.hadoop.hbase.KeyValue) if forward is true) but only
does a seek operation after checking that it is really necessary for the
row/column combination specified by the kv parameter. This function was
added to avoid unnecessary disk seeks by checking row-column Bloom filters
before a seek on multi-column get/scan queries, and to optimize by looking
up more recent files first.requestSeek in interface KeyValueScannerrequestSeek in class KeyValueHeapforward - do a forward-only "reseek" instead of a random-access seekuseBloom - whether to enable multi-column Bloom filter optimizationIOExceptionpublic boolean seekToPreviousRow(KeyValue seekKey) throws IOException
KeyValueScannerseekToPreviousRow in interface KeyValueScannerseekToPreviousRow in class NonReversedNonLazyKeyValueScannerseekKey - seek valueIOExceptionpublic boolean backwardSeek(KeyValue seekKey) throws IOException
KeyValueScannerbackwardSeek in interface KeyValueScannerbackwardSeek in class NonReversedNonLazyKeyValueScannerseekKey - seek KeyValueIOExceptionpublic KeyValue next() throws IOException
KeyValueScannernext in interface KeyValueScannernext in class KeyValueHeapIOExceptionpublic boolean seekToLastRow()
throws IOException
KeyValueScannerseekToLastRow in interface KeyValueScannerseekToLastRow in class NonReversedNonLazyKeyValueScannerIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.