|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KeyValueScanner
Scanner that returns the next KeyValue.
Method Summary | |
---|---|
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?). |
long |
getSequenceID()
Get the sequence id associated with this KeyValueScanner. |
boolean |
isFileScanner()
|
KeyValue |
next()
Return the next KeyValue in this scanner, iterating the scanner |
KeyValue |
peek()
Look at the next KeyValue 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(KeyValue kv,
boolean forward,
boolean useBloom)
Similar to seek(org.apache.hadoop.hbase.KeyValue) (or 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 key)
Reseek the scanner at or after the specified KeyValue. |
boolean |
seek(KeyValue key)
Seek the scanner at or after the specified KeyValue. |
boolean |
shouldUseScanner(Scan scan,
SortedSet<byte[]> columns,
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. |
Method Detail |
---|
KeyValue peek()
KeyValue next() throws IOException
IOException
boolean seek(KeyValue key) throws IOException
key
- seek value
IOException
boolean reseek(KeyValue key) throws IOException
key
- seek value (should be non-null)
IOException
long getSequenceID()
void close()
boolean shouldUseScanner(Scan scan, SortedSet<byte[]> columns, long oldestUnexpiredTS)
scan
- the scan that we are selecting scanners forcolumns
- the set of columns in the current column family, or null if
not specified by the scanoldestUnexpiredTS
- the oldest timestamp we are interested in for
this query, based on TTL
boolean requestSeek(KeyValue kv, boolean forward, boolean useBloom) throws IOException
seek(org.apache.hadoop.hbase.KeyValue)
(or 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.
forward
- do a forward-only "reseek" instead of a random-access seekuseBloom
- whether to enable multi-column Bloom filter optimization
IOException
boolean realSeekDone()
void enforceSeek() throws IOException
realSeekDone()
first.
IOException
boolean isFileScanner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |