@InterfaceAudience.Private public class NoTagsByteBufferKeyValue extends ByteBufferKeyValue
buf, FIXED_OVERHEAD, length, offsetCELL_NOT_BASED_ON_CHUNK| Constructor and Description |
|---|
NoTagsByteBufferKeyValue(ByteBuffer buf,
int offset,
int length) |
NoTagsByteBufferKeyValue(ByteBuffer buf,
int offset,
int length,
long seqId) |
| Modifier and Type | Method and Description |
|---|---|
ExtendedCell |
deepClone()
Does a deep copy of the contents to a new memory area and returns it as a new cell.
|
int |
getSerializedSize(boolean withTags) |
byte[] |
getTagsArray()
Contiguous raw bytes representing tags that may start at any index in the containing array.
|
int |
getTagsLength()
HBase internally uses 2 bytes to store tags length in Cell.
|
equals, getBuffer, getFamilyArray, getFamilyByteBuffer, getFamilyLength, getFamilyOffset, getFamilyPosition, getOffset, getQualifierArray, getQualifierByteBuffer, getQualifierLength, getQualifierOffset, getQualifierPosition, getRowArray, getRowByteBuffer, getRowLength, getRowOffset, getRowPosition, getSequenceId, getTagsByteBuffer, getTagsOffset, getTagsPosition, getTimestamp, getTypeByte, getValueArray, getValueByteBuffer, getValueLength, getValueOffset, getValuePosition, hashCode, heapSize, setSequenceId, setTimestamp, setTimestamp, toString, write, writeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChunkIdpublic NoTagsByteBufferKeyValue(ByteBuffer buf, int offset, int length)
public NoTagsByteBufferKeyValue(ByteBuffer buf, int offset, int length, long seqId)
public byte[] getTagsArray()
CellgetTagsArray in interface CellgetTagsArray in class ByteBufferKeyValuepublic 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.getTagsLength in interface CellgetTagsLength in class ByteBufferKeyValuepublic int getSerializedSize(boolean withTags)
getSerializedSize in interface ExtendedCellgetSerializedSize in class ByteBufferKeyValuewithTags - Whether to write tags.KeyValue format.
<4 bytes keylength> <4 bytes valuelength> <2 bytes rowlength>
<row> <1 byte columnfamilylength> <columnfamily> <columnqualifier>
<8 bytes timestamp> <1 byte keytype> <value> <2 bytes tagslength>
<tags>public ExtendedCell deepClone()
ExtendedCelldeepClone in interface ExtendedCelldeepClone in class ByteBufferKeyValueCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.