protected static class HFileReaderV2.ScannerV2 extends HFileReaderV2.AbstractScannerV2
HFileScanner
interface.block, nextIndexedKey
blockBuffer, 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 |
---|---|
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.
|
readNextDataBlock, reseekTo, seekBefore, seekTo, seekTo
assertSeeked, getReader, isSeeked, reseekTo, seekBefore, seekTo, toString
public HFileReaderV2.ScannerV2(HFileReaderV2 r, boolean cacheBlocks, boolean pread, boolean isCompaction)
public ByteBuffer getKey()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.public ByteBuffer getValue()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.public boolean next() throws IOException
getKey()
and getValue()
can
be called.IOException
public boolean seekTo() throws IOException
IOException
protected int loadBlockAndSeekToKey(HFileBlock seekToBlock, byte[] nextIndexedKey, boolean rewind, byte[] key, int offset, int length, boolean seekBefore) throws IOException
loadBlockAndSeekToKey
in class HFileReaderV2.AbstractScannerV2
IOException
protected ByteBuffer getFirstKeyInBlock(HFileBlock curBlock)
getFirstKeyInBlock
in class HFileReaderV2.AbstractScannerV2
public String getKeyString()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.public String getValueString()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.Copyright © 2013 The Apache Software Foundation. All rights reserved.