@InterfaceAudience.Private public class RowIndexSeekerV1 extends AbstractDataBlockEncoder.AbstractEncodedSeeker
Modifier and Type | Class and Description |
---|---|
protected class |
RowIndexSeekerV1.SeekerState |
comparator, decodingCtx
Constructor and Description |
---|
RowIndexSeekerV1(KeyValue.KVComparator comparator,
HFileBlockDecodingContext decodingCtx) |
Modifier and Type | Method and Description |
---|---|
int |
compareKey(KeyValue.KVComparator comparator,
byte[] key,
int offset,
int length)
Compare the given key against the current key
|
int |
compareKey(KeyValue.KVComparator comparator,
Cell key) |
protected ByteBuffer |
createKVBuffer() |
protected void |
decodeAtPosition(int position) |
protected void |
decodeFirst() |
protected void |
decodeNext() |
protected void |
decodeTags() |
ByteBuffer |
getKeyDeepCopy()
Does a deep copy of the key at the current position.
|
Cell |
getKeyValue() |
ByteBuffer |
getValueShallowCopy()
Does a shallow copy of the value at the current position.
|
boolean |
next()
Move to next position
|
void |
rewind()
Set position to beginning of given block
|
int |
seekToKeyInBlock(byte[] key,
int offset,
int length,
boolean seekBefore)
Moves the seeker position within the current block to:
the last key that that is less than or equal to the given key if
seekBefore is false
the last key that is strictly less than the given key if
seekBefore is true. |
int |
seekToKeyInBlock(Cell seekCell,
boolean seekBefore)
Moves the seeker position within the current block to:
the last key that that is less than or equal to the given key if
seekBefore is false
the last key that is strictly less than the given key if
seekBefore is true. |
void |
setCurrentBuffer(ByteBuffer buffer)
Set on which buffer there will be done seeking.
|
includesMvcc, includesTags
public RowIndexSeekerV1(KeyValue.KVComparator comparator, HFileBlockDecodingContext decodingCtx)
public void setCurrentBuffer(ByteBuffer buffer)
DataBlockEncoder.EncodedSeeker
buffer
- Used for seeking.public ByteBuffer getKeyDeepCopy()
DataBlockEncoder.EncodedSeeker
public ByteBuffer getValueShallowCopy()
DataBlockEncoder.EncodedSeeker
protected ByteBuffer createKVBuffer()
public Cell getKeyValue()
public void rewind()
DataBlockEncoder.EncodedSeeker
public boolean next()
DataBlockEncoder.EncodedSeeker
public int seekToKeyInBlock(byte[] key, int offset, int length, boolean seekBefore)
DataBlockEncoder.EncodedSeeker
seekBefore
is false
seekBefore
is true. The caller is responsible for loading the
previous block if the requested key turns out to be the first key of the
current block.key
- byte array containing the keyoffset
- key position the arraylength
- key length in bytesseekBefore
- find the key strictly less than the given key in case
of an exact match. Does not matter in case of an inexact match.public int seekToKeyInBlock(Cell seekCell, boolean seekBefore)
DataBlockEncoder.EncodedSeeker
seekBefore
is false
seekBefore
is true. The caller is responsible for loading the
previous block if the requested key turns out to be the first key of the
current block.seekCell
- - Cell to which the seek should happenseekBefore
- find the key strictly less than the given key in case
of an exact match. Does not matter in case of an inexact match.public int compareKey(KeyValue.KVComparator comparator, byte[] key, int offset, int length)
DataBlockEncoder.EncodedSeeker
public int compareKey(KeyValue.KVComparator comparator, Cell key)
protected void decodeFirst()
protected void decodeAtPosition(int position)
protected void decodeNext()
protected void decodeTags()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.