|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.hfile.AbstractHFileReader.Scanner
org.apache.hadoop.hbase.io.hfile.HFileReaderV2.AbstractScannerV2
org.apache.hadoop.hbase.io.hfile.HFileReaderV2.ScannerV2
protected static class HFileReaderV2.ScannerV2
Implementation of HFileScanner
interface.
Field Summary |
---|
Fields inherited from class org.apache.hadoop.hbase.io.hfile.HFileReaderV2.AbstractScannerV2 |
---|
block, nextIndexedKey |
Fields inherited from class org.apache.hadoop.hbase.io.hfile.AbstractHFileReader.Scanner |
---|
blockBuffer, blockFetches, cacheBlocks, currKeyLen, currMemstoreTS, currMemstoreTSLen, currValueLen, isCompaction, pread |
Constructor Summary | |
---|---|
HFileReaderV2.ScannerV2(HFileReaderV2 r,
boolean cacheBlocks,
boolean pread,
boolean isCompaction)
|
Method Summary | |
---|---|
protected int |
blockSeek(byte[] key,
int offset,
int length,
boolean seekBefore)
Within a loaded block, seek looking for the last key that is smaller than (or equal to?) the key we are interested in. |
int |
compareKey(KeyValue.KVComparator comparator,
byte[] key,
int offset,
int length)
Compare the given key against the current key |
protected KeyValue |
formNoTagsKeyValue()
|
protected int |
getCellBufSize()
|
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()
|
protected int |
getNextCellStartPosition()
|
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. |
protected void |
readKeyValueLen()
|
protected void |
readMvccVersion()
|
boolean |
seekTo()
Positions this scanner at the start of the file. |
protected void |
setNonSeekedState()
|
protected void |
updateCurrBlock(HFileBlock newBlock)
Updates the current block to be the given HFileBlock . |
Methods inherited from class org.apache.hadoop.hbase.io.hfile.HFileReaderV2.AbstractScannerV2 |
---|
getNextIndexedKey, readNextDataBlock, reseekTo, seekBefore, seekTo, seekTo |
Methods inherited from class org.apache.hadoop.hbase.io.hfile.AbstractHFileReader.Scanner |
---|
assertSeeked, getReader, isSeeked, reseekTo, seekBefore, seekTo, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HFileReaderV2.ScannerV2(HFileReaderV2 r, boolean cacheBlocks, boolean pread, boolean isCompaction)
Method Detail |
---|
public KeyValue getKeyValue()
KeyValue
.protected KeyValue formNoTagsKeyValue()
protected int getCellBufSize()
public ByteBuffer getKey()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.
public int compareKey(KeyValue.KVComparator comparator, byte[] key, int offset, int length)
HFileReaderV2.AbstractScannerV2
compareKey
in class HFileReaderV2.AbstractScannerV2
public ByteBuffer getValue()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.
protected void setNonSeekedState()
public boolean next() throws IOException
getKey()
and getValue()
can
be called.
IOException
protected int getNextCellStartPosition()
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 void updateCurrBlock(HFileBlock newBlock)
HFileBlock
. Seeks to
the the first key/value pair.
newBlock
- the block to make currentprotected void readKeyValueLen()
protected void readMvccVersion()
protected int blockSeek(byte[] key, int offset, int length, boolean seekBefore)
key
- the key to findseekBefore
- find the key before the given key in case of exact
match.
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |