org.apache.hadoop.hbase.io.hfile
Class HFileReaderV3.ScannerV3
java.lang.Object
org.apache.hadoop.hbase.io.hfile.AbstractHFileReader.Scanner
org.apache.hadoop.hbase.io.hfile.HFileReaderV2.AbstractScannerV2
org.apache.hadoop.hbase.io.hfile.HFileReaderV2.ScannerV2
org.apache.hadoop.hbase.io.hfile.HFileReaderV3.ScannerV3
- All Implemented Interfaces:
- HFileScanner
- Enclosing class:
- HFileReaderV3
protected static class HFileReaderV3.ScannerV3
- extends HFileReaderV2.ScannerV2
Implementation of HFileScanner
interface.
Methods inherited from class org.apache.hadoop.hbase.io.hfile.HFileReaderV2.ScannerV2 |
compareKey, formNoTagsKeyValue, getFirstKeyInBlock, getKey, getKeyString, getValue, getValueString, loadBlockAndSeekToKey, next, readMvccVersion, seekTo, updateCurrBlock |
HFileReaderV3.ScannerV3
public HFileReaderV3.ScannerV3(HFileReaderV3 r,
boolean cacheBlocks,
boolean pread,
boolean isCompaction)
getCellBufSize
protected int getCellBufSize()
- Overrides:
getCellBufSize
in class HFileReaderV2.ScannerV2
getKeyValue
public KeyValue getKeyValue()
- Specified by:
getKeyValue
in interface HFileScanner
- Overrides:
getKeyValue
in class HFileReaderV2.ScannerV2
- Returns:
- Instance of
KeyValue
.
setNonSeekedState
protected void setNonSeekedState()
- Overrides:
setNonSeekedState
in class HFileReaderV2.ScannerV2
getNextCellStartPosition
protected int getNextCellStartPosition()
- Overrides:
getNextCellStartPosition
in class HFileReaderV2.ScannerV2
readKeyValueLen
protected void readKeyValueLen()
- Overrides:
readKeyValueLen
in class HFileReaderV2.ScannerV2
blockSeek
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.
A note on the seekBefore: if you have seekBefore = true, AND the first
key in the block = key, then you'll get thrown exceptions. The caller has
to check for that case and load the previous block as appropriate.
- Overrides:
blockSeek
in class HFileReaderV2.ScannerV2
- Parameters:
key
- the key to findseekBefore
- find the key before the given key in case of exact match.offset
- Offset to find the key in the given bytebufferlength
- Length of the key to be found
- Returns:
- 0 in case of an exact key match, 1 in case of an inexact match,
-2 in case of an inexact match and furthermore, the input key
less than the first key of current block(e.g. using a faked index
key)
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.