protected static class HFileReaderImpl.EncodedScanner extends HFileReaderImpl.HFileScannerImpl
blockFetches, cacheBlocks, curBlock, isCompaction, nextIndexedKey, pread, prevBlocks, reader| Constructor and Description |
|---|
EncodedScanner(HFile.Reader reader,
boolean cacheBlocks,
boolean pread,
boolean isCompaction,
HFileContext meta) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareKey(CellComparator comparator,
Cell key) |
Cell |
getCell() |
protected Cell |
getFirstKeyCellInBlock(HFileBlock curBlock) |
Cell |
getKey()
Gets the current key in the form of a cell.
|
String |
getKeyString()
Convenience method to get a copy of the key as a string - interpreting the
bytes as UTF8.
|
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.
|
boolean |
isSeeked() |
protected int |
loadBlockAndSeekToKey(HFileBlock seekToBlock,
Cell nextIndexedKey,
boolean rewind,
Cell key,
boolean seekBefore) |
boolean |
next()
Go to the next key/value in the block section.
|
protected boolean |
processFirstDataBlock() |
void |
setNonSeekedState() |
protected void |
updateCurrentBlock(HFileBlock newBlock)
Updates the current block to be the given
HFileBlock. |
assertSeeked, blockSeek, checkKeyLen, checkKeyValueLen, checkLen, close, getEffectiveDataBlockEncoding, getNextIndexedKey, getReader, readAndUpdateNewBlock, readKeyValueLen, readMvccVersion, readNextDataBlock, reseekTo, seekBefore, seekTo, seekTo, seekTo, shipped, toStringpublic EncodedScanner(HFile.Reader reader, boolean cacheBlocks, boolean pread, boolean isCompaction, HFileContext meta)
public boolean isSeeked()
isSeeked in interface HFileScannerisSeeked in class HFileReaderImpl.HFileScannerImplHFileScanner.seekBefore(Cell) or HFileScanner.seekTo() or HFileScanner.seekTo(Cell).
Otherwise returns false.public void setNonSeekedState()
setNonSeekedState in class HFileReaderImpl.HFileScannerImplprotected void updateCurrentBlock(HFileBlock newBlock) throws CorruptHFileException
HFileBlock. Seeks to
the the first key/value pair.updateCurrentBlock in class HFileReaderImpl.HFileScannerImplnewBlock - the block to make currentCorruptHFileExceptionprotected boolean processFirstDataBlock()
throws IOException
processFirstDataBlock in class HFileReaderImpl.HFileScannerImplIOExceptionpublic boolean next()
throws IOException
HFileReaderImpl.HFileScannerImplHFileReaderImpl.HFileScannerImpl.getKey() and HFileReaderImpl.HFileScannerImpl.getValue() can
be called.next in interface HFileScannernext in class HFileReaderImpl.HFileScannerImplIOExceptionpublic Cell getKey()
HFileScannerHFileScanner.seekTo(Cell) before this method.getKey in interface HFileScannergetKey in class HFileReaderImpl.HFileScannerImplpublic ByteBuffer getValue()
HFileScannerHFileScanner.seekTo(Cell) before this method.getValue in interface HFileScannergetValue in class HFileReaderImpl.HFileScannerImplpublic Cell getCell()
getCell in interface HFileScannergetCell in class HFileReaderImpl.HFileScannerImplCell.public String getKeyString()
HFileScannerHFileScanner.seekTo(Cell) before this method.getKeyString in interface HFileScannergetKeyString in class HFileReaderImpl.HFileScannerImplpublic String getValueString()
HFileScannerHFileScanner.seekTo(Cell) before this method.getValueString in interface HFileScannergetValueString in class HFileReaderImpl.HFileScannerImplprotected Cell getFirstKeyCellInBlock(HFileBlock curBlock)
getFirstKeyCellInBlock in class HFileReaderImpl.HFileScannerImplprotected int loadBlockAndSeekToKey(HFileBlock seekToBlock, Cell nextIndexedKey, boolean rewind, Cell key, boolean seekBefore) throws IOException
loadBlockAndSeekToKey in class HFileReaderImpl.HFileScannerImplIOExceptionpublic int compareKey(CellComparator comparator, Cell key)
compareKey in class HFileReaderImpl.HFileScannerImplCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.