@InterfaceAudience.Private public class PrefixTreeSeeker extends Object implements DataBlockEncoder.EncodedSeeker
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
includeMvccVersion |
protected PrefixTreeArraySearcher |
ptSearcher |
| Constructor and Description |
|---|
PrefixTreeSeeker(boolean includeMvccVersion) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
advance() |
int |
compareKey(CellComparator comparator,
Cell key) |
Cell |
get()
Currently unused.
|
Cell |
getCell()
currently must do deep copy into new array
|
Cell |
getKey() |
ByteBuffer |
getValueShallowCopy() |
boolean |
next() |
void |
releaseCurrentSearcher()
Currently unused.
|
void |
rewind() |
int |
seekToKeyInBlock(Cell key,
boolean forceBeforeOnExactMatch) |
protected int |
seekToOrBeforeUsingPositionAtOrAfter(Cell kv,
boolean seekBefore) |
protected int |
seekToOrBeforeUsingPositionAtOrBefore(Cell kv,
boolean seekBefore) |
void |
setCurrentBuffer(ByteBuff fullBlockBuffer) |
protected boolean includeMvccVersion
protected PrefixTreeArraySearcher ptSearcher
public void setCurrentBuffer(ByteBuff fullBlockBuffer)
setCurrentBuffer in interface DataBlockEncoder.EncodedSeekerpublic void releaseCurrentSearcher()
Currently unused.
TODO performance leak. should reuse the searchers. hbase does not currently have a hook where this can be calledpublic Cell getKey()
getKey in interface DataBlockEncoder.EncodedSeekerpublic ByteBuffer getValueShallowCopy()
getValueShallowCopy in interface DataBlockEncoder.EncodedSeekerpublic Cell getCell()
getCell in interface DataBlockEncoder.EncodedSeekerpublic Cell get()
Currently unused.
A nice, lightweight reference, though the underlying cell is transient. This method may return the same reference to the backing PrefixTreeCell repeatedly, while other implementations may return a different reference for each Cell.
The goal will be to transition the upper layers of HBase, like Filters and KeyValueHeap, to use this method instead of the getKeyValue() methods above.public void rewind()
rewind in interface DataBlockEncoder.EncodedSeekerpublic boolean next()
next in interface DataBlockEncoder.EncodedSeekerpublic boolean advance()
protected int seekToOrBeforeUsingPositionAtOrBefore(Cell kv, boolean seekBefore)
protected int seekToOrBeforeUsingPositionAtOrAfter(Cell kv, boolean seekBefore)
public int seekToKeyInBlock(Cell key, boolean forceBeforeOnExactMatch)
seekToKeyInBlock in interface DataBlockEncoder.EncodedSeekerpublic int compareKey(CellComparator comparator, Cell key)
compareKey in interface DataBlockEncoder.EncodedSeekerCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.