@InterfaceAudience.Private class ReversedStoreScanner extends StoreScanner implements KeyValueScanner
StoreScanner.StoreScannerCompactionRace
cacheBlocks, cellsPerHeartbeatCheck, closing, columns, countPerRow, DEFAULT_HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK, executor, explicitColumnQuery, get, HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK, heap, lastTop, LAZY_SEEK_ENABLED_BY_DEFAULT, lazySeekEnabledGlobally, lock, matcher, maxRowSize, minVersions, now, oldestUnexpiredTS, parallelSeekEnabled, scan, store, storeLimit, storeOffset, STORESCANNER_PARALLEL_SEEK_ENABLE, useRowColBloom
NO_NEXT_INDEXED_KEY
Constructor and Description |
---|
ReversedStoreScanner(Scan scan,
ScanInfo scanInfo,
ScanType scanType,
NavigableSet<byte[]> columns,
List<KeyValueScanner> scanners)
Constructor for testing.
|
ReversedStoreScanner(Store store,
ScanInfo scanInfo,
Scan scan,
NavigableSet<byte[]> columns,
long readPt)
Opens a scanner across memstore, snapshot, and all StoreFiles.
|
Modifier and Type | Method and Description |
---|---|
boolean |
backwardSeek(Cell key)
Seek the scanner at or before the row of specified Cell, it firstly
tries to seek the scanner at or after the specified Cell, return if
peek KeyValue of scanner has the same row with specified Cell,
otherwise seek the scanner at the first Cell of the row which is the
previous row of specified KeyValue
|
protected void |
checkScanOrder(Cell prevKV,
Cell kv,
KeyValue.KVComparator comparator)
Check whether scan as expected order
|
boolean |
reseek(Cell kv)
Reseek the scanner at or after the specified KeyValue.
|
protected void |
resetKVHeap(List<? extends KeyValueScanner> scanners,
KeyValue.KVComparator comparator) |
boolean |
seek(Cell key)
Seek the scanner at or after the specified KeyValue.
|
protected boolean |
seekAsDirection(Cell kv)
Do a backwardSeek in a reversed StoreScanner(scan backward)
|
protected void |
seekScanners(List<? extends KeyValueScanner> scanners,
Cell seekKey,
boolean isLazy,
boolean isParallelSeek)
Seek the specified scanners with the given key
|
protected boolean |
seekToNextRow(Cell kv) |
boolean |
seekToPreviousRow(Cell key)
Seek the scanner at the first Cell of the row which is the previous row
of specified key
|
checkReseek, close, enableLazySeekGlobally, getAllScannersForTesting, getEstimatedNumberOfKvsScanned, getNextIndexedKey, getScannersNoCompaction, getSequenceID, next, next, next, peek, resetScannerStack, selectScannersFrom, updateReaders
seekToLastRow
doRealSeek, enforceSeek, isFileScanner, realSeekDone, requestSeek, shouldUseScanner
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, enforceSeek, getNextIndexedKey, getSequenceID, isFileScanner, next, peek, realSeekDone, requestSeek, seekToLastRow, shouldUseScanner
ReversedStoreScanner(Store store, ScanInfo scanInfo, Scan scan, NavigableSet<byte[]> columns, long readPt) throws IOException
store
- who we scanscanInfo
- scan
- the speccolumns
- which columns we are scanningIOException
ReversedStoreScanner(Scan scan, ScanInfo scanInfo, ScanType scanType, NavigableSet<byte[]> columns, List<KeyValueScanner> scanners) throws IOException
IOException
protected void resetKVHeap(List<? extends KeyValueScanner> scanners, KeyValue.KVComparator comparator) throws IOException
resetKVHeap
in class StoreScanner
IOException
protected void seekScanners(List<? extends KeyValueScanner> scanners, Cell seekKey, boolean isLazy, boolean isParallelSeek) throws IOException
StoreScanner
seekScanners
in class StoreScanner
isLazy
- true if using lazy seekisParallelSeek
- true if using parallel seekIOException
protected boolean seekToNextRow(Cell kv) throws IOException
seekToNextRow
in class StoreScanner
IOException
protected boolean seekAsDirection(Cell kv) throws IOException
seekAsDirection
in class StoreScanner
IOException
protected void checkScanOrder(Cell prevKV, Cell kv, KeyValue.KVComparator comparator) throws IOException
StoreScanner
checkScanOrder
in class StoreScanner
IOException
public boolean reseek(Cell kv) throws IOException
KeyValueScanner
reseek
in interface KeyValueScanner
reseek
in class StoreScanner
kv
- seek value (should be non-null)IOException
public boolean seek(Cell key) throws IOException
KeyValueScanner
seek
in interface KeyValueScanner
seek
in class StoreScanner
key
- seek valueIOException
public boolean seekToPreviousRow(Cell key) throws IOException
KeyValueScanner
seekToPreviousRow
in interface KeyValueScanner
seekToPreviousRow
in class NonReversedNonLazyKeyValueScanner
key
- seek valueIOException
public boolean backwardSeek(Cell key) throws IOException
KeyValueScanner
backwardSeek
in interface KeyValueScanner
backwardSeek
in class NonReversedNonLazyKeyValueScanner
key
- seek KeyValueIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.