@InterfaceAudience.Private public class PrefixTreeArraySearcher extends PrefixTreeArrayReversibleScanner implements CellSearcher
afterLast, beforeFirst, blockMeta, currentCellIndex, currentRowNode, familyReader, mvccVersionDecoder, nubCellsRemain, qualifierReader, rowNodes, rowNodeStackIndex, tagsReader, timestampDecoder
absoluteValueOffset, block, DEFAULT_TYPE, familyBuffer, familyLength, familyOffset, includeMvccVersion, mvccVersion, qualifierBuffer, qualifierLength, qualifierOffset, rowBuffer, rowLength, tagsBuffer, tagsLength, tagsOffset, timestamp, type, TYPES, valueLength
Constructor and Description |
---|
PrefixTreeArraySearcher(PrefixTreeBlockMeta blockMeta,
int rowTreeDepth,
int rowBufferLength,
int qualifierBufferLength,
int tagsBufferLength)
construct
|
Modifier and Type | Method and Description |
---|---|
protected int |
compareToCurrentToken(Cell key)
Compare only the bytes within the window of the current token
|
protected boolean |
currentPositionIsAfter(Cell cell)
internal methods
|
boolean |
equals(Object obj)
Object methods
|
protected CellScannerPosition |
fixRowFanMissForward(int fanInsertionPoint) |
protected CellScannerPosition |
fixRowFanMissReverse(int fanInsertionPoint)
complete seek when fan mismatch
|
protected CellScannerPosition |
fixRowTokenMissForward(int searcherIsAfterInputKey) |
protected CellScannerPosition |
fixRowTokenMissReverse(int searcherIsAfterInputKey) |
protected void |
followLastFansUntilExhausted() |
void |
positionAfterLastCell()
The content of the buffers doesn't matter here, only that afterLast=true and beforeFirst=false
|
boolean |
positionAt(Cell key)
CellSearcher methods
|
CellScannerPosition |
positionAtOrAfter(Cell key)
Identical workflow as positionAtOrBefore, but split them to avoid having ~10 extra
if-statements.
|
CellScannerPosition |
positionAtOrBefore(Cell key)
Same as positionAt(..), but go to the extra effort of finding the previous key if there's no
exact match.
|
protected CellScannerPosition |
positionAtQualifierTimestamp(Cell key,
boolean beforeOnMiss) |
protected boolean |
rowMatchesAfterCurrentPosition(Cell key)
compare this.row to key.row but starting at the current rowLength
|
boolean |
seekForwardTo(Cell key)
Note: Added for backwards compatibility with
KeyValueScanner.reseek(org.apache.hadoop.hbase.Cell)
Look for the key, but only look after the current position. |
CellScannerPosition |
seekForwardToOrAfter(Cell key)
Same as seekForwardTo(..), but go to the extra effort of finding the next key if there's no
exact match.
|
CellScannerPosition |
seekForwardToOrBefore(Cell key)
Same as seekForwardTo(..), but go to the extra effort of finding the next key if there's no
exact match.
|
descendToLastRowFromCurrentPosition, isDirectlyAfterNub, positionAtLastCell, positionAtLastRow, previous, previousRow
advance, appendCurrentTokenToRowBuffer, appendToRowBuffer, areBuffersBigEnough, current, discardCurrentRowNode, followCurrentFan, followFan, followFirstFan, followLastFan, followNextFan, followPreviousFan, getBlockMeta, getMaxRowTreeStackNodes, getQualifierBufferLength, getRowBufferLength, getTagBufferLength, getTreeBytes, hashCode, hasOccurrences, initFirstNode, initOnBlock, isAfterLast, isBeforeFirst, isBranch, isFirstCellInRow, isLastCellInRow, isLeaf, isNub, isOutOfBounds, markAfterLast, markBeforeFirst, nextRow, nextRowInternal, popFromRowBuffer, populateFamily, populateFirstNonRowFields, populateLastNonRowFields, populateMvccVersion, populateNonRowFields, populateNonRowFieldsAndCompareTo, populatePreviousNonRowFields, populateQualifier, populateTag, populateTimestamp, populateType, populateValueOffsets, positionAtFirstCell, reInitFirstNode, releaseBlockReference, resetToBeforeFirstEntry, toString
compareTo, getFamily, getFamilyArray, getFamilyLength, getFamilyOffset, getKeyValueString, getMvccVersion, getQualifier, getQualifierArray, getQualifierLength, getQualifierOffset, getRow, getRowArray, getRowLength, getRowOffset, getSequenceId, getTagsArray, getTagsLength, getTagsOffset, getTimestamp, getTypeByte, getValue, getValueArray, getValueLength, getValueOffset, setSequenceId
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
resetToBeforeFirstEntry
previous, previousRow
advance, current
public PrefixTreeArraySearcher(PrefixTreeBlockMeta blockMeta, int rowTreeDepth, int rowBufferLength, int qualifierBufferLength, int tagsBufferLength)
public boolean positionAt(Cell key)
positionAt
in interface CellSearcher
key
- position the CellScanner exactly on this keypublic CellScannerPosition positionAtOrBefore(Cell key)
CellSearcher
positionAtOrBefore
in interface CellSearcher
key
- position the CellScanner on this key or the closest cell beforepublic CellScannerPosition positionAtOrAfter(Cell key)
positionAtOrAfter
in interface CellSearcher
key
- position the CellScanner on this key or the closest cell afterpublic boolean seekForwardTo(Cell key)
CellSearcher
KeyValueScanner.reseek(org.apache.hadoop.hbase.Cell)
Look for the key, but only look after the current position. Probably not needed for an
efficient tree implementation, but is important for implementations without random access such
as unencoded KeyValue blocks.
seekForwardTo
in interface CellSearcher
key
- position the CellScanner exactly on this keypublic CellScannerPosition seekForwardToOrBefore(Cell key)
CellSearcher
seekForwardToOrBefore
in interface CellSearcher
public CellScannerPosition seekForwardToOrAfter(Cell key)
CellSearcher
seekForwardToOrAfter
in interface CellSearcher
public void positionAfterLastCell()
positionAfterLastCell
in interface CellSearcher
public boolean equals(Object obj)
equals
in class PrefixTreeArrayReversibleScanner
protected boolean currentPositionIsAfter(Cell cell)
protected CellScannerPosition positionAtQualifierTimestamp(Cell key, boolean beforeOnMiss)
protected boolean rowMatchesAfterCurrentPosition(Cell key)
key
- Cell being searched forprotected int compareToCurrentToken(Cell key)
key
- protected void followLastFansUntilExhausted()
protected CellScannerPosition fixRowTokenMissReverse(int searcherIsAfterInputKey)
searcherIsAfterInputKey
- <0: input key is before the searcher's positionprotected CellScannerPosition fixRowTokenMissForward(int searcherIsAfterInputKey)
searcherIsAfterInputKey
- <0: input key is before the searcher's positionprotected CellScannerPosition fixRowFanMissReverse(int fanInsertionPoint)
protected CellScannerPosition fixRowFanMissForward(int fanInsertionPoint)
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.