protected static class HFileReaderV2.ScannerV2 extends HFileReaderV2.AbstractScannerV2
HFileScanner interface.block, nextIndexedKeyblockBuffer, blockFetches, cacheBlocks, currKeyLen, currMemstoreTS, currMemstoreTSLen, currValueLen, isCompaction, pread| Constructor and Description |
|---|
HFileReaderV2.ScannerV2(HFileReaderV2 r,
boolean cacheBlocks,
boolean pread,
boolean isCompaction) |
| 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
|
protected ByteBuffer |
getFirstKeyInBlock(HFileBlock curBlock) |
ByteBuffer |
getKey()
Gets a buffer view to the current key.
|
String |
getKeyString()
Convenience method to get a copy of the key as a string - interpreting the
bytes as UTF8.
|
KeyValue |
getKeyValue() |
ByteBuffer |
getValue()
Gets a buffer view to the current value.
|
String |
getValueString()
Convenience method to get a copy of the value as a string - interpreting
the bytes as UTF8.
|
protected int |
loadBlockAndSeekToKey(HFileBlock seekToBlock,
byte[] nextIndexedKey,
boolean rewind,
byte[] key,
int offset,
int length,
boolean seekBefore) |
boolean |
next()
Go to the next key/value in the block section.
|
boolean |
seekTo()
Positions this scanner at the start of the file.
|
isSeeked, readNextDataBlock, reseekTo, seekBefore, seekTo, seekToassertSeeked, getReader, reseekTo, seekBefore, seekTo, toStringpublic HFileReaderV2.ScannerV2(HFileReaderV2 r, boolean cacheBlocks, boolean pread, boolean isCompaction)
public 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 ByteBuffer getValue()
HFileScannerHFileScanner.seekTo(byte[]) before this method.public boolean next()
throws IOException
getKey() and getValue() can
be called.IOExceptionpublic boolean seekTo()
throws IOException
IOExceptionprotected int loadBlockAndSeekToKey(HFileBlock seekToBlock, byte[] nextIndexedKey, boolean rewind, byte[] key, int offset, int length, boolean seekBefore) throws IOException
loadBlockAndSeekToKey in class HFileReaderV2.AbstractScannerV2IOExceptionprotected ByteBuffer getFirstKeyInBlock(HFileBlock curBlock)
getFirstKeyInBlock in class HFileReaderV2.AbstractScannerV2public String getKeyString()
HFileScannerHFileScanner.seekTo(byte[]) before this method.public String getValueString()
HFileScannerHFileScanner.seekTo(byte[]) before this method.Copyright © 2014 The Apache Software Foundation. All Rights Reserved.