@InterfaceAudience.Private
public interface KeyValueScanner
Modifier and Type | Method and Description |
---|---|
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.
|
KeyValue peek()
KeyValue next() throws IOException
IOException
boolean seek(KeyValue key) throws IOException
key
- seek valueIOException
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 TTLboolean 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 optimizationIOException
boolean realSeekDone()
void enforceSeek() throws IOException
realSeekDone()
first.IOException
boolean isFileScanner()
Copyright © 2013 The Apache Software Foundation. All rights reserved.