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, toString
public EncodedScanner(HFile.Reader reader, boolean cacheBlocks, boolean pread, boolean isCompaction, HFileContext meta)
public boolean isSeeked()
isSeeked
in interface HFileScanner
isSeeked
in class HFileReaderImpl.HFileScannerImpl
HFileScanner.seekBefore(Cell)
or HFileScanner.seekTo()
or HFileScanner.seekTo(Cell)
.
Otherwise returns false.public void setNonSeekedState()
setNonSeekedState
in class HFileReaderImpl.HFileScannerImpl
protected void updateCurrentBlock(HFileBlock newBlock) throws CorruptHFileException
HFileBlock
. Seeks to
the the first key/value pair.updateCurrentBlock
in class HFileReaderImpl.HFileScannerImpl
newBlock
- the block to make currentCorruptHFileException
protected boolean processFirstDataBlock() throws IOException
processFirstDataBlock
in class HFileReaderImpl.HFileScannerImpl
IOException
public boolean next() throws IOException
HFileReaderImpl.HFileScannerImpl
HFileReaderImpl.HFileScannerImpl.getKey()
and HFileReaderImpl.HFileScannerImpl.getValue()
can
be called.next
in interface HFileScanner
next
in class HFileReaderImpl.HFileScannerImpl
IOException
public Cell getKey()
HFileScanner
HFileScanner.seekTo(Cell)
before this method.getKey
in interface HFileScanner
getKey
in class HFileReaderImpl.HFileScannerImpl
public ByteBuffer getValue()
HFileScanner
HFileScanner.seekTo(Cell)
before this method.getValue
in interface HFileScanner
getValue
in class HFileReaderImpl.HFileScannerImpl
public Cell getCell()
getCell
in interface HFileScanner
getCell
in class HFileReaderImpl.HFileScannerImpl
Cell
.public String getKeyString()
HFileScanner
HFileScanner.seekTo(Cell)
before this method.getKeyString
in interface HFileScanner
getKeyString
in class HFileReaderImpl.HFileScannerImpl
public String getValueString()
HFileScanner
HFileScanner.seekTo(Cell)
before this method.getValueString
in interface HFileScanner
getValueString
in class HFileReaderImpl.HFileScannerImpl
protected Cell getFirstKeyCellInBlock(HFileBlock curBlock)
getFirstKeyCellInBlock
in class HFileReaderImpl.HFileScannerImpl
protected int loadBlockAndSeekToKey(HFileBlock seekToBlock, Cell nextIndexedKey, boolean rewind, Cell key, boolean seekBefore) throws IOException
loadBlockAndSeekToKey
in class HFileReaderImpl.HFileScannerImpl
IOException
public int compareKey(CellComparator comparator, Cell key)
compareKey
in class HFileReaderImpl.HFileScannerImpl
Copyright © 2007–2019 Cloudera. All rights reserved.