protected abstract static class AbstractHFileReader.Scanner extends Object implements HFileScanner
| 限定符和类型 | 字段和说明 |
|---|---|
protected ByteBuffer |
blockBuffer |
protected AtomicInteger |
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 |
| 构造器和说明 |
|---|
AbstractHFileReader.Scanner(HFile.Reader reader,
boolean cacheBlocks,
boolean pread,
boolean isCompaction) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
assertSeeked() |
void |
close()
Close the stream socket to handle RS CLOSE_WAIT.
|
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] .. k[n], where there are n keys in the file. |
int |
seekTo(byte[] key)
SeekTo or just before the passed
key. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetKey, getKeyString, getKeyValue, getNextIndexedKey, getValue, getValueString, next, reseekTo, reseekTo, seekBefore, seekBefore, seekTo, seekTo, seekToprotected 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 AtomicInteger blockFetches
protected final HFile.Reader reader
public AbstractHFileReader.Scanner(HFile.Reader reader, boolean cacheBlocks, boolean pread, boolean isCompaction)
public boolean isSeeked()
isSeeked 在接口中 HFileScannerHFileScanner.seekBefore(byte[]) or HFileScanner.seekTo() or HFileScanner.seekTo(byte[]).
Otherwise returns false.protected 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 在接口中 HFileScannerkey - Key to find.IOExceptionpublic boolean seekBefore(byte[] key)
throws IOException
HFileScannerk[0] .. k[n], where there are n keys in the file.seekBefore 在接口中 HFileScannerkey - Key to findIOExceptionpublic 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 在接口中 HFileScannerkey - Key to find (should be non-null)IOExceptionpublic HFile.Reader getReader()
getReader 在接口中 HFileScannerpublic void close()
HFileScannerclose 在接口中 HFileScannerCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.