@InterfaceAudience.Private public class StoreScanner extends NonReversedNonLazyKeyValueScanner implements KeyValueScanner, InternalScanner, ChangedReadersObserver
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cacheBlocks |
protected long |
cellsPerHeartbeatCheck |
protected boolean |
closing |
protected java.util.NavigableSet<byte[]> |
columns |
protected int |
countPerRow |
static long |
DEFAULT_HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK
Default value of
HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK. |
protected ExecutorService |
executor |
protected boolean |
explicitColumnQuery |
static java.lang.String |
HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK
The number of cells scanned in between timeout checks.
|
protected KeyValueHeap |
heap |
protected boolean |
isGet |
protected boolean |
isParallelSeekEnabled
A flag that enables StoreFileScanner parallel-seeking
|
protected Cell |
lastTop |
protected static boolean |
lazySeekEnabledGlobally
Used during unit testing to ensure that lazy seek does save seek ops
|
protected java.util.concurrent.locks.ReentrantLock |
lock |
protected ScanQueryMatcher |
matcher |
protected long |
maxRowSize |
protected int |
minVersions |
protected long |
now |
protected long |
oldestUnexpiredTS |
protected long |
readPt |
protected Scan |
scan |
protected Store |
store |
protected int |
storeLimit |
protected int |
storeOffset |
static java.lang.String |
STORESCANNER_PARALLEL_SEEK_ENABLE |
protected boolean |
useRowColBloom |
| Modifier | Constructor and Description |
|---|---|
|
StoreScanner(Scan scan,
ScanInfo scanInfo,
ScanType scanType,
java.util.NavigableSet<byte[]> columns,
java.util.List<KeyValueScanner> scanners,
long earliestPutTs,
long readPt) |
protected |
StoreScanner(Store store,
boolean cacheBlocks,
Scan scan,
java.util.NavigableSet<byte[]> columns,
long ttl,
int minVersions,
long readPt)
An internal constructor.
|
|
StoreScanner(Store store,
ScanInfo scanInfo,
Scan scan,
java.util.List<? extends KeyValueScanner> scanners,
long smallestReadPoint,
long earliestPutTs,
byte[] dropDeletesFromRow,
byte[] dropDeletesToRow)
Used for compactions that drop deletes from a limited range of rows.
|
|
StoreScanner(Store store,
ScanInfo scanInfo,
Scan scan,
java.util.List<? extends KeyValueScanner> scanners,
ScanType scanType,
long smallestReadPoint,
long earliestPutTs)
Used for compactions.
|
|
StoreScanner(Store store,
ScanInfo scanInfo,
Scan scan,
java.util.NavigableSet<byte[]> columns,
long readPt)
Opens a scanner across memstore, snapshot, and all StoreFiles.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
checkReseek() |
protected void |
checkScanOrder(Cell prevKV,
Cell kv,
KeyValue.KVComparator comparator)
Check whether scan as expected order
|
void |
close()
Close the KeyValue scanner.
|
long |
getEstimatedNumberOfKvsScanned() |
Cell |
getNextIndexedKey() |
protected java.util.List<KeyValueScanner> |
getScannersNoCompaction()
Get a filtered list of scanners.
|
long |
getSequenceID()
Get the sequence id associated with this KeyValueScanner.
|
KeyValue |
next()
Return the next Cell in this scanner, iterating the scanner
|
boolean |
next(java.util.List<Cell> outResult)
Grab the next row's worth of values.
|
boolean |
next(java.util.List<Cell> outResult,
ScannerContext scannerContext)
Get the next row of values from this Store.
|
Cell |
peek()
Look at the next Cell in this scanner, but do not iterate scanner.
|
boolean |
reseek(Cell kv)
Reseek the scanner at or after the specified KeyValue.
|
protected void |
resetKVHeap(java.util.List<? extends KeyValueScanner> scanners,
KeyValue.KVComparator comparator) |
protected void |
resetScannerStack(Cell lastTopKey) |
boolean |
seek(Cell key)
Seek the scanner at or after the specified KeyValue.
|
protected boolean |
seekAsDirection(Cell kv)
Do a reseek in a normal StoreScanner(scan forward)
|
protected void |
seekScanners(java.util.List<? extends KeyValueScanner> scanners,
Cell seekKey,
boolean isLazy,
boolean isParallelSeek)
Seek the specified scanners with the given key
|
protected boolean |
seekToNextRow(Cell kv) |
protected java.util.List<KeyValueScanner> |
selectScannersFrom(java.util.List<? extends KeyValueScanner> allScanners)
Filters the given list of scanners using Bloom filter, time range, and
TTL.
|
void |
updateReaders()
Notify observers.
|
backwardSeek, seekToLastRow, seekToPreviousRowdoRealSeek, enforceSeek, isFileScanner, realSeekDone, requestSeek, shouldUseScannerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbackwardSeek, enforceSeek, isFileScanner, realSeekDone, requestSeek, seekToLastRow, seekToPreviousRow, shouldUseScannerprotected Store store
protected ScanQueryMatcher matcher
protected KeyValueHeap heap
protected boolean cacheBlocks
protected int countPerRow
protected int storeLimit
protected int storeOffset
protected boolean closing
protected final boolean isGet
protected final boolean explicitColumnQuery
protected final boolean useRowColBloom
protected boolean isParallelSeekEnabled
protected ExecutorService executor
protected final Scan scan
protected final java.util.NavigableSet<byte[]> columns
protected final long oldestUnexpiredTS
protected final long now
protected final int minVersions
protected final long maxRowSize
protected final long cellsPerHeartbeatCheck
public static final java.lang.String STORESCANNER_PARALLEL_SEEK_ENABLE
protected static boolean lazySeekEnabledGlobally
public static final java.lang.String HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK
public static final long DEFAULT_HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK
HBASE_CELLS_SCANNED_PER_HEARTBEAT_CHECK.protected Cell lastTop
protected java.util.concurrent.locks.ReentrantLock lock
protected final long readPt
protected StoreScanner(Store store, boolean cacheBlocks, Scan scan, java.util.NavigableSet<byte[]> columns, long ttl, int minVersions, long readPt)
public StoreScanner(Store store, ScanInfo scanInfo, Scan scan, java.util.NavigableSet<byte[]> columns, long readPt) throws java.io.IOException
store - who we scanscan - the speccolumns - which columns we are scanningjava.io.IOExceptionpublic StoreScanner(Store store, ScanInfo scanInfo, Scan scan, java.util.List<? extends KeyValueScanner> scanners, ScanType scanType, long smallestReadPoint, long earliestPutTs) throws java.io.IOException
Opens a scanner across specified StoreFiles.
store - who we scanscan - the specscanners - ancillary scannerssmallestReadPoint - the readPoint that we should use for tracking
versionsjava.io.IOExceptionpublic StoreScanner(Store store, ScanInfo scanInfo, Scan scan, java.util.List<? extends KeyValueScanner> scanners, long smallestReadPoint, long earliestPutTs, byte[] dropDeletesFromRow, byte[] dropDeletesToRow) throws java.io.IOException
Opens a scanner across specified StoreFiles.
store - who we scanscan - the specscanners - ancillary scannerssmallestReadPoint - the readPoint that we should use for tracking versionsdropDeletesFromRow - The inclusive left bound of the range; can be EMPTY_START_ROW.dropDeletesToRow - The exclusive right bound of the range; can be EMPTY_END_ROW.java.io.IOExceptionpublic StoreScanner(Scan scan, ScanInfo scanInfo, ScanType scanType, java.util.NavigableSet<byte[]> columns, java.util.List<KeyValueScanner> scanners, long earliestPutTs, long readPt) throws java.io.IOException
java.io.IOExceptionprotected java.util.List<KeyValueScanner> getScannersNoCompaction() throws java.io.IOException
java.io.IOExceptionprotected void seekScanners(java.util.List<? extends KeyValueScanner> scanners, Cell seekKey, boolean isLazy, boolean isParallelSeek) throws java.io.IOException
scanners - seekKey - isLazy - true if using lazy seekisParallelSeek - true if using parallel seekjava.io.IOExceptionprotected void resetKVHeap(java.util.List<? extends KeyValueScanner> scanners, KeyValue.KVComparator comparator) throws java.io.IOException
java.io.IOExceptionprotected java.util.List<KeyValueScanner> selectScannersFrom(java.util.List<? extends KeyValueScanner> allScanners)
public Cell peek()
KeyValueScannerpeek in interface KeyValueScannerpublic KeyValue next()
KeyValueScannernext in interface KeyValueScannerpublic void close()
KeyValueScannerclose in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface InternalScannerclose in interface KeyValueScannerpublic boolean seek(Cell key) throws java.io.IOException
KeyValueScannerseek in interface KeyValueScannerkey - seek valuejava.io.IOExceptionpublic boolean next(java.util.List<Cell> outResult) throws java.io.IOException
InternalScannernext in interface InternalScanneroutResult - return output arrayjava.io.IOException - epublic boolean next(java.util.List<Cell> outResult, ScannerContext scannerContext) throws java.io.IOException
next in interface InternalScanneroutResult - scannerContext - java.io.IOException - epublic void updateReaders()
throws java.io.IOException
ChangedReadersObserverupdateReaders in interface ChangedReadersObserverjava.io.IOException - eprotected boolean checkReseek()
throws java.io.IOException
java.io.IOExceptionprotected void resetScannerStack(Cell lastTopKey) throws java.io.IOException
java.io.IOExceptionprotected void checkScanOrder(Cell prevKV, Cell kv, KeyValue.KVComparator comparator) throws java.io.IOException
prevKV - kv - comparator - java.io.IOExceptionprotected boolean seekToNextRow(Cell kv) throws java.io.IOException
java.io.IOExceptionprotected boolean seekAsDirection(Cell kv) throws java.io.IOException
kv - java.io.IOExceptionpublic boolean reseek(Cell kv) throws java.io.IOException
KeyValueScannerreseek in interface KeyValueScannerkv - seek value (should be non-null)java.io.IOExceptionpublic long getSequenceID()
KeyValueScannergetSequenceID in interface KeyValueScannerpublic long getEstimatedNumberOfKvsScanned()
public Cell getNextIndexedKey()
getNextIndexedKey in interface KeyValueScannergetNextIndexedKey in class NonLazyKeyValueScanner