@InterfaceAudience.Private public interface KeyValueScanner extends Shipper, Closeable
Modifier and Type | Field and Description |
---|---|
static Cell |
NO_NEXT_INDEXED_KEY
The byte array represents for NO_NEXT_INDEXED_KEY;
The actual value is irrelevant because this is always compared by reference.
|
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
|
void |
close()
Close the KeyValue scanner.
|
void |
enforceSeek()
Does the real seek operation in case it was skipped by
seekToRowCol(KeyValue, boolean) (TODO: Whats this?).
|
org.apache.hadoop.fs.Path |
getFilePath() |
Cell |
getNextIndexedKey() |
default long |
getScannerOrder()
Get the order of this KeyValueScanner.
|
boolean |
isFileScanner() |
Cell |
next()
Return the next Cell in this scanner, iterating the scanner
|
Cell |
peek()
Look at the next Cell in this scanner, but do not iterate scanner.
|
boolean |
realSeekDone()
We optimize our store scanners by checking the most recent store file
first, so we sometimes pretend we have done a seek but delay it until the
store scanner bubbles up to the top of the key-value heap.
|
boolean |
requestSeek(Cell kv,
boolean forward,
boolean useBloom)
Similar to
seek(org.apache.hadoop.hbase.Cell) (or reseek(org.apache.hadoop.hbase.Cell) 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(Cell key)
Reseek the scanner at or after the specified KeyValue.
|
boolean |
seek(Cell key)
Seek the scanner at or after the specified KeyValue.
|
boolean |
seekToLastRow()
Seek the scanner at the first KeyValue of last row
|
boolean |
seekToPreviousRow(Cell key)
Seek the scanner at the first Cell of the row which is the previous row
of specified key
|
boolean |
shouldUseScanner(Scan scan,
HStore store,
long oldestUnexpiredTS)
Allows to filter out scanners (both StoreFile and memstore) that we don't
want to use based on criteria such as Bloom filters and timestamp ranges.
|
static final Cell NO_NEXT_INDEXED_KEY
Cell peek()
Cell next() throws IOException
IOException
boolean seek(Cell key) throws IOException
key
- seek valueIOException
boolean reseek(Cell key) throws IOException
key
- seek value (should be non-null)IOException
default long getScannerOrder()
void close()
close
in interface AutoCloseable
close
in interface Closeable
boolean shouldUseScanner(Scan scan, HStore store, long oldestUnexpiredTS)
scan
- the scan that we are selecting scanners forstore
- the store we are performing the scan on.oldestUnexpiredTS
- the oldest timestamp we are interested in for
this query, based on TTLboolean requestSeek(Cell kv, boolean forward, boolean useBloom) throws IOException
seek(org.apache.hadoop.hbase.Cell)
(or reseek(org.apache.hadoop.hbase.Cell)
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.forward
- do a forward-only "reseek" instead of a random-access seekuseBloom
- whether to enable multi-column Bloom filter optimizationIOException
boolean realSeekDone()
void enforceSeek() throws IOException
realSeekDone()
first.IOException
boolean isFileScanner()
org.apache.hadoop.fs.Path getFilePath()
isFileScanner()
boolean backwardSeek(Cell key) throws IOException
key
- seek KeyValueIOException
boolean seekToPreviousRow(Cell key) throws IOException
key
- seek valueIOException
boolean seekToLastRow() throws IOException
IOException
Cell getNextIndexedKey()
Copyright © 2007–2019 Cloudera. All rights reserved.