protected static class HFileReaderV2.EncodedScannerV2 extends HFileReaderV2.AbstractScannerV2
| Modifier and Type | Field and Description |
|---|---|
protected HFileContext |
meta |
block, nextIndexedKeyblockBuffer, blockFetches, cacheBlocks, currKeyLen, currMemstoreTS, currMemstoreTSLen, currValueLen, isCompaction, pread, reader| Constructor and Description |
|---|
EncodedScannerV2(HFileReaderV2 reader,
boolean cacheBlocks,
boolean pread,
boolean isCompaction,
HFileContext meta) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareKey(KeyValue.KVComparator comparator,
byte[] key,
int offset,
int length)
Compare the given key against the current key
|
int |
compareKey(KeyValue.KVComparator comparator,
Cell key) |
protected java.nio.ByteBuffer |
getFirstKeyInBlock(HFileBlock curBlock) |
java.nio.ByteBuffer |
getKey()
Gets a buffer view to the current key.
|
java.lang.String |
getKeyString()
Convenience method to get a copy of the key as a string - interpreting the
bytes as UTF8.
|
Cell |
getKeyValue() |
java.nio.ByteBuffer |
getValue()
Gets a buffer view to the current value.
|
java.lang.String |
getValueString()
Convenience method to get a copy of the value as a string - interpreting
the bytes as UTF8.
|
boolean |
isSeeked() |
protected int |
loadBlockAndSeekToKey(HFileBlock seekToBlock,
Cell nextIndexedKey,
boolean rewind,
Cell key,
boolean seekBefore) |
boolean |
next()
Scans to the next entry in the file.
|
boolean |
seekTo()
Positions this scanner at the start of the file.
|
getEffectiveDataBlockEncoding, getNextIndexedKey, readNextDataBlock, reseekTo, reseekTo, seekBefore, seekBefore, seekTo, seekTo, seekToassertSeeked, close, getReader, reseekTo, seekBefore, seekTo, toStringprotected final HFileContext meta
public EncodedScannerV2(HFileReaderV2 reader, boolean cacheBlocks, boolean pread, boolean isCompaction, HFileContext meta)
public boolean isSeeked()
isSeeked in interface HFileScannerisSeeked in class AbstractHFileReader.ScannerHFileScanner.seekBefore(byte[]) or HFileScanner.seekTo() or HFileScanner.seekTo(byte[]).
Otherwise returns false.public boolean seekTo()
throws java.io.IOException
HFileScannerjava.io.IOExceptionpublic boolean next()
throws java.io.IOException
HFileScannerjava.io.IOExceptionpublic java.nio.ByteBuffer getKey()
HFileScannerHFileScanner.seekTo(byte[]) before this method.public int compareKey(KeyValue.KVComparator comparator, byte[] key, int offset, int length)
HFileReaderV2.AbstractScannerV2compareKey in class HFileReaderV2.AbstractScannerV2public java.nio.ByteBuffer getValue()
HFileScannerHFileScanner.seekTo(byte[]) before this method.public java.lang.String getKeyString()
HFileScannerHFileScanner.seekTo(byte[]) before this method.public java.lang.String getValueString()
HFileScannerHFileScanner.seekTo(byte[]) before this method.protected java.nio.ByteBuffer getFirstKeyInBlock(HFileBlock curBlock)
getFirstKeyInBlock in class HFileReaderV2.AbstractScannerV2protected int loadBlockAndSeekToKey(HFileBlock seekToBlock, Cell nextIndexedKey, boolean rewind, Cell key, boolean seekBefore) throws java.io.IOException
loadBlockAndSeekToKey in class HFileReaderV2.AbstractScannerV2java.io.IOExceptionpublic int compareKey(KeyValue.KVComparator comparator, Cell key)
compareKey in class HFileReaderV2.AbstractScannerV2