@InterfaceAudience.Private public class ByteBufferKeyOnlyKeyValue extends ByteBufferCell
KeyValue.KeyOnlyKeyValue
with respect to key serialization but have its data in the form of Byte buffer
(onheap and offheap).| Constructor and Description |
|---|
ByteBufferKeyOnlyKeyValue()
Used in cases where we want to avoid lot of garbage by allocating new objects with different
keys.
|
ByteBufferKeyOnlyKeyValue(ByteBuffer buf,
int offset,
int length) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getFamilyArray()
Contiguous bytes composed of legal HDFS filename characters which may start at any index in the
containing array.
|
ByteBuffer |
getFamilyByteBuffer() |
byte |
getFamilyLength() |
int |
getFamilyOffset() |
int |
getFamilyPosition() |
byte[] |
getQualifierArray()
Contiguous raw bytes that may start at any index in the containing array.
|
ByteBuffer |
getQualifierByteBuffer() |
int |
getQualifierLength() |
int |
getQualifierOffset() |
int |
getQualifierPosition() |
byte[] |
getRowArray()
Contiguous raw bytes that may start at any index in the containing array.
|
ByteBuffer |
getRowByteBuffer() |
short |
getRowLength() |
int |
getRowOffset() |
int |
getRowPosition() |
long |
getSequenceId()
A region-specific unique monotonically increasing sequence ID given to each Cell.
|
byte[] |
getTagsArray()
Contiguous raw bytes representing tags that may start at any index in the containing array.
|
ByteBuffer |
getTagsByteBuffer() |
int |
getTagsLength()
HBase internally uses 2 bytes to store tags length in Cell.
|
int |
getTagsOffset() |
int |
getTagsPosition() |
long |
getTimestamp() |
byte |
getTypeByte() |
byte[] |
getValueArray()
Contiguous raw bytes that may start at any index in the containing array.
|
ByteBuffer |
getValueByteBuffer() |
int |
getValueLength() |
int |
getValueOffset() |
int |
getValuePosition() |
void |
setKey(ByteBuffer key,
int offset,
int length)
A setter that helps to avoid object creation every time and whenever
there is a need to create new OffheapKeyOnlyKeyValue.
|
String |
toString() |
public ByteBufferKeyOnlyKeyValue()
setKey(ByteBuffer, int, int)public ByteBufferKeyOnlyKeyValue(ByteBuffer buf, int offset, int length)
public void setKey(ByteBuffer key, int offset, int length)
key - offset - length - public byte[] getRowArray()
Cellpublic int getRowOffset()
public short getRowLength()
public byte[] getFamilyArray()
Cellpublic int getFamilyOffset()
public byte getFamilyLength()
public byte[] getQualifierArray()
Cellpublic int getQualifierOffset()
public int getQualifierLength()
public long getTimestamp()
public byte getTypeByte()
public long getSequenceId()
CellHConstants.KEEP_SEQID_PERIOD days, but generally becomes irrelevant after the cell's
row is no longer involved in any operations that require strict consistency.public byte[] getValueArray()
Cellpublic int getValueOffset()
public int getValueLength()
public byte[] getTagsArray()
Cellpublic int getTagsOffset()
public int getTagsLength()
CellTagUtil.MAX_TAGS_LENGTH, which is 2 * Short.MAX_VALUE + 1 = 65535.
As a result, the return type is int, because a short is not capable of handling that.
Please note that even if the return type is int, the max tags length is far less than Integer.MAX_VALUE.public ByteBuffer getRowByteBuffer()
getRowByteBuffer in class ByteBufferCellByteBuffer containing the row bytes.public int getRowPosition()
getRowPosition in class ByteBufferCellByteBuffer where row bytes startpublic ByteBuffer getFamilyByteBuffer()
getFamilyByteBuffer in class ByteBufferCellByteBuffer containing the column family bytes.public int getFamilyPosition()
getFamilyPosition in class ByteBufferCellByteBuffer where column family bytes startpublic ByteBuffer getQualifierByteBuffer()
getQualifierByteBuffer in class ByteBufferCellByteBuffer containing the column qualifier bytes.public int getQualifierPosition()
getQualifierPosition in class ByteBufferCellByteBuffer where column qualifier bytes startpublic ByteBuffer getValueByteBuffer()
getValueByteBuffer in class ByteBufferCellByteBuffer containing the value bytes.public int getValuePosition()
getValuePosition in class ByteBufferCellByteBuffer where value bytes startpublic ByteBuffer getTagsByteBuffer()
getTagsByteBuffer in class ByteBufferCellByteBuffer containing the tag bytes.public int getTagsPosition()
getTagsPosition in class ByteBufferCellByteBuffer where tag bytes startCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.