Package org.apache.hadoop.hbase
Class NoTagsByteBufferKeyValue
java.lang.Object
org.apache.hadoop.hbase.ByteBufferExtendedCell
org.apache.hadoop.hbase.ByteBufferKeyValue
org.apache.hadoop.hbase.NoTagsByteBufferKeyValue
- All Implemented Interfaces:
Cell
,ExtendedCell
,HeapSize
,RawCell
- Direct Known Subclasses:
NoTagByteBufferChunkKeyValue
,SizeCachedNoTagsByteBufferKeyValue
An extension of the ByteBufferKeyValue where the tags length is always 0
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.ByteBufferKeyValue
buf, FIXED_OVERHEAD, length, offset
Fields inherited from interface org.apache.hadoop.hbase.ExtendedCell
CELL_NOT_BASED_ON_CHUNK
Fields inherited from interface org.apache.hadoop.hbase.RawCell
MAX_TAGS_LENGTH
-
Constructor Summary
ConstructorsConstructorDescriptionNoTagsByteBufferKeyValue
(ByteBuffer buf, int offset, int length) NoTagsByteBufferKeyValue
(ByteBuffer buf, int offset, int length, long seqId) -
Method Summary
Modifier and TypeMethodDescriptionDoes a deep copy of the contents to a new memory area and returns it as a new cell.int
getSerializedSize
(boolean withTags) KeyValue formatbyte[]
Contiguous raw bytes representing tags that may start at any index in the containing array.int
HBase internally uses 2 bytes to store tags length in Cell.Methods inherited from class org.apache.hadoop.hbase.ByteBufferKeyValue
equals, getBuffer, getFamilyArray, getFamilyByteBuffer, getFamilyLength, getFamilyLength, getFamilyLengthPosition, getFamilyLengthPosition, getFamilyOffset, getFamilyPosition, getFamilyPosition, getKeyLength, getOffset, getQualifierArray, getQualifierByteBuffer, getQualifierLength, getQualifierLength, getQualifierOffset, getQualifierPosition, getQualifierPosition, getRowArray, getRowByteBuffer, getRowLength, getRowOffset, getRowPosition, getSequenceId, getSerializedSize, getTagsByteBuffer, getTagsOffset, getTagsPosition, getTimestamp, getTimestamp, getTypeByte, getTypeByte, getValueArray, getValueByteBuffer, getValueLength, getValueOffset, getValuePosition, hashCode, heapSize, setSequenceId, setTimestamp, setTimestamp, toString, write, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.ExtendedCell
getChunkId, getType
-
Constructor Details
-
NoTagsByteBufferKeyValue
-
NoTagsByteBufferKeyValue
-
-
Method Details
-
getTagsArray
Description copied from interface:RawCell
Contiguous raw bytes representing tags that may start at any index in the containing array.- Specified by:
getTagsArray
in interfaceRawCell
- Overrides:
getTagsArray
in classByteBufferKeyValue
- Returns:
- the tags byte array
-
getTagsLength
Description copied from interface:RawCell
HBase internally uses 2 bytes to store tags length in Cell. As the tags length is always a non-negative number, to make good use of the sign bit, the max of tags length is defined 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.- Specified by:
getTagsLength
in interfaceRawCell
- Overrides:
getTagsLength
in classByteBufferKeyValue
- Returns:
- the total length of the tags in the Cell.
-
getSerializedSize
Description copied from interface:ExtendedCell
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>
- Specified by:
getSerializedSize
in interfaceExtendedCell
- Overrides:
getSerializedSize
in classByteBufferKeyValue
- Parameters:
withTags
- Whether to write tags.- Returns:
- Bytes count required to serialize this Cell in a
KeyValue
format.
-
deepClone
Description copied from interface:ExtendedCell
Does a deep copy of the contents to a new memory area and returns it as a new cell.- Specified by:
deepClone
in interfaceExtendedCell
- Overrides:
deepClone
in classByteBufferKeyValue
- Returns:
- The deep cloned cell
-