|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.io.hfile.AbstractHFileReader.Scanner
protected abstract static class AbstractHFileReader.Scanner
| Field Summary | |
|---|---|
protected ByteBuffer |
blockBuffer
|
protected int |
blockFetches
|
protected boolean |
cacheBlocks
|
protected int |
currKeyLen
|
protected long |
currMemstoreTS
|
protected int |
currMemstoreTSLen
|
protected int |
currValueLen
|
protected boolean |
isCompaction
|
protected boolean |
pread
|
protected HFile.Reader |
reader
|
| Constructor Summary | |
|---|---|
AbstractHFileReader.Scanner(HFile.Reader reader,
boolean cacheBlocks,
boolean pread,
boolean isCompaction)
|
|
| Method Summary | |
|---|---|
protected void |
assertSeeked()
|
HFile.Reader |
getReader()
|
boolean |
isSeeked()
|
int |
reseekTo(byte[] key)
Reseek to or just before the passed key. |
boolean |
seekBefore(byte[] key)
Consider the key stream of all the keys in the file, k[0] .. |
int |
seekTo(byte[] key)
SeekTo or just before the passed key. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.hadoop.hbase.io.hfile.HFileScanner |
|---|
getKey, getKeyString, getKeyValue, getValue, getValueString, next, reseekTo, seekBefore, seekTo, seekTo |
| Field Detail |
|---|
protected ByteBuffer blockBuffer
protected boolean cacheBlocks
protected final boolean pread
protected final boolean isCompaction
protected int currKeyLen
protected int currValueLen
protected int currMemstoreTSLen
protected long currMemstoreTS
protected int blockFetches
protected final HFile.Reader reader
| Constructor Detail |
|---|
public AbstractHFileReader.Scanner(HFile.Reader reader,
boolean cacheBlocks,
boolean pread,
boolean isCompaction)
| Method Detail |
|---|
public boolean isSeeked()
isSeeked in interface HFileScannerHFileScanner.seekBefore(byte[]) or HFileScanner.seekTo() or HFileScanner.seekTo(byte[]).
Otherwise returns false.public String toString()
toString in class Objectprotected void assertSeeked()
public int seekTo(byte[] key)
throws IOException
HFileScannerkey. Examine the return
code to figure whether we found the key or not.
Consider the key stream of all the keys in the file,
k[0] .. k[n], where there are n keys in the file.
seekTo in interface HFileScannerkey - Key to find.
IOException
public boolean seekBefore(byte[] key)
throws IOException
HFileScannerk[0] .. k[n], where there are n keys in the file.
seekBefore in interface HFileScannerkey - Key to find
IOException
public int reseekTo(byte[] key)
throws IOException
HFileScannerkey. Similar to seekTo
except that this can be called even if the scanner is not at the beginning
of a file.
This can be used to seek only to keys which come after the current position
of the scanner.
Consider the key stream of all the keys in the file,
k[0] .. k[n], where there are n keys in the file after
current position of HFileScanner.
The scanner will position itself between k[i] and k[i+1] where
k[i] < key <= k[i+1].
If there is no key k[i+1] greater than or equal to the input key, then the
scanner will position itself at the end of the file and next() will return
false when it is called.
reseekTo in interface HFileScannerkey - Key to find (should be non-null)
IOExceptionpublic HFile.Reader getReader()
getReader in interface HFileScanner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||