org.apache.hadoop.hbase.io.hfile
Class HFileReaderV3.ScannerV3

java.lang.Object
  extended by org.apache.hadoop.hbase.io.hfile.AbstractHFileReader.Scanner
      extended by org.apache.hadoop.hbase.io.hfile.HFileReaderV2.AbstractScannerV2
          extended by org.apache.hadoop.hbase.io.hfile.HFileReaderV2.ScannerV2
              extended by 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.


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
HFileReaderV3.ScannerV3(HFileReaderV3 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.
protected  int getCellBufSize()
           
 KeyValue getKeyValue()
           
protected  int getNextCellStartPosition()
           
protected  void readKeyValueLen()
           
protected  void setNonSeekedState()
           
 
Methods inherited from class org.apache.hadoop.hbase.io.hfile.HFileReaderV2.ScannerV2
compareKey, formNoTagsKeyValue, getFirstKeyInBlock, getKey, getKeyString, getValue, getValueString, loadBlockAndSeekToKey, next, readMvccVersion, seekTo, updateCurrBlock
 
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

HFileReaderV3.ScannerV3

public HFileReaderV3.ScannerV3(HFileReaderV3 r,
                               boolean cacheBlocks,
                               boolean pread,
                               boolean isCompaction)
Method Detail

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 find
seekBefore - find the key before the given key in case of exact match.
offset - Offset to find the key in the given bytebuffer
length - 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.