|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.codec.prefixtree.PrefixTreeSeeker
@InterfaceAudience.Private public class PrefixTreeSeeker
These methods have the same definition as any implementation of the EncodedSeeker. In the future, the EncodedSeeker could be modified to work with the Cell interface directly. It currently returns a new KeyValue object each time getKeyValue is called. This is not horrible, but in order to create a new KeyValue object, we must first allocate a new byte[] and copy in the data from the PrefixTreeCell. It is somewhat heavyweight right now.
Field Summary | |
---|---|
protected ByteBuffer |
block
|
protected boolean |
includeMvccVersion
|
protected PrefixTreeArraySearcher |
ptSearcher
|
Constructor Summary | |
---|---|
PrefixTreeSeeker(boolean includeMvccVersion)
|
Method Summary | |
---|---|
boolean |
advance()
|
Cell |
get()
Currently unused. |
ByteBuffer |
getKeyDeepCopy()
|
KeyValue |
getKeyValue()
currently must do deep copy into new array |
ByteBuffer |
getKeyValueBuffer()
currently must do deep copy into new array |
ByteBuffer |
getValueShallowCopy()
|
boolean |
next()
|
void |
releaseCurrentSearcher()
Currently unused. |
void |
rewind()
|
int |
seekToKeyInBlock(byte[] keyOnlyBytes,
int offset,
int length,
boolean forceBeforeOnExactMatch)
Seek forward only (should be called reseekToKeyInBlock?). |
protected int |
seekToOrBeforeUsingPositionAtOrAfter(byte[] keyOnlyBytes,
int offset,
int length,
boolean seekBefore)
|
protected int |
seekToOrBeforeUsingPositionAtOrBefore(byte[] keyOnlyBytes,
int offset,
int length,
boolean seekBefore)
|
void |
setCurrentBuffer(ByteBuffer fullBlockBuffer)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ByteBuffer block
protected boolean includeMvccVersion
protected PrefixTreeArraySearcher ptSearcher
Constructor Detail |
---|
public PrefixTreeSeeker(boolean includeMvccVersion)
Method Detail |
---|
public void setCurrentBuffer(ByteBuffer fullBlockBuffer)
setCurrentBuffer
in interface DataBlockEncoder.EncodedSeeker
public void releaseCurrentSearcher()
public ByteBuffer getKeyDeepCopy()
getKeyDeepCopy
in interface DataBlockEncoder.EncodedSeeker
public ByteBuffer getValueShallowCopy()
getValueShallowCopy
in interface DataBlockEncoder.EncodedSeeker
public ByteBuffer getKeyValueBuffer()
getKeyValueBuffer
in interface DataBlockEncoder.EncodedSeeker
public KeyValue getKeyValue()
getKeyValue
in interface DataBlockEncoder.EncodedSeeker
public Cell get()
public void rewind()
rewind
in interface DataBlockEncoder.EncodedSeeker
public boolean next()
next
in interface DataBlockEncoder.EncodedSeeker
public boolean advance()
public int seekToKeyInBlock(byte[] keyOnlyBytes, int offset, int length, boolean forceBeforeOnExactMatch)
seekToKeyInBlock
in interface DataBlockEncoder.EncodedSeeker
keyOnlyBytes
- KeyValue format of a Cell's key at which to position the seekeroffset
- offset into the keyOnlyBytes arraylength
- number of bytes of the keyOnlyBytes array to useforceBeforeOnExactMatch
- if an exact match is found and seekBefore=true, back up 1 Cell
protected int seekToOrBeforeUsingPositionAtOrBefore(byte[] keyOnlyBytes, int offset, int length, boolean seekBefore)
protected int seekToOrBeforeUsingPositionAtOrAfter(byte[] keyOnlyBytes, int offset, int length, boolean seekBefore)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |