protected static class HFileReaderV1.ScannerV1 extends HFileReaderV1.AbstractScannerV1
HFileScanner
interface.currBlock
blockBuffer, blockFetches, cacheBlocks, currKeyLen, currMemstoreTS, currMemstoreTSLen, currValueLen, isCompaction, pread
Constructor and Description |
---|
HFileReaderV1.ScannerV1(HFileReaderV1 reader,
boolean cacheBlocks,
boolean pread,
boolean isCompaction) |
Modifier and Type | Method and Description |
---|---|
protected int |
blockSeek(byte[] key,
int offset,
int length,
boolean seekBefore)
Within a loaded block, seek looking for the first key
that is smaller than (or equal to?) the key we are interested in.
|
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 void |
loadBlock(int bloc,
boolean rewind) |
boolean |
next()
Scans to the next entry in the file.
|
boolean |
seekTo()
Positions this scanner at the start of the file.
|
reseekTo, seekBefore, seekTo
assertSeeked, getReader, isSeeked, reseekTo, seekBefore, seekTo, toString
public HFileReaderV1.ScannerV1(HFileReaderV1 reader, 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
HFileScanner
IOException
protected int blockSeek(byte[] key, int offset, int length, boolean seekBefore)
HFileReaderV1.AbstractScannerV1
blockSeek
in class HFileReaderV1.AbstractScannerV1
key
- to findseekBefore
- find the key before the exact match.public String getKeyString()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.public String getValueString()
HFileScanner
HFileScanner.seekTo(byte[])
before this method.public boolean seekTo() throws IOException
HFileScanner
IOException
protected void loadBlock(int bloc, boolean rewind) throws IOException
loadBlock
in class HFileReaderV1.AbstractScannerV1
IOException
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.