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, offsetFields inherited from interface org.apache.hadoop.hbase.ExtendedCell
CELL_NOT_BASED_ON_CHUNKFields 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.intgetSerializedSize(boolean withTags) KeyValue formatbyte[]Contiguous raw bytes representing tags that may start at any index in the containing array.intHBase 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, writeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.ExtendedCell
getChunkId
-
Constructor Details
-
NoTagsByteBufferKeyValue
-
NoTagsByteBufferKeyValue
-
-
Method Details
-
getTagsArray
Description copied from interface:ExtendedCellContiguous raw bytes representing tags that may start at any index in the containing array.- Specified by:
getTagsArrayin interfaceCell- Specified by:
getTagsArrayin interfaceExtendedCell- Overrides:
getTagsArrayin classByteBufferKeyValue- Returns:
- the tags byte array
-
getTagsLength
Description copied from interface:ExtendedCellHBase 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:
getTagsLengthin interfaceCell- Specified by:
getTagsLengthin interfaceExtendedCell- Overrides:
getTagsLengthin classByteBufferKeyValue- Returns:
- the total length of the tags in the Cell.
-
getSerializedSize
Description copied from interface:ExtendedCellKeyValue 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:
getSerializedSizein interfaceExtendedCell- Overrides:
getSerializedSizein classByteBufferKeyValue- Parameters:
withTags- Whether to write tags.- Returns:
- Bytes count required to serialize this Cell in a
KeyValueformat.
-
deepClone
Description copied from interface:ExtendedCellDoes a deep copy of the contents to a new memory area and returns it as a new cell.- Specified by:
deepClonein interfaceExtendedCell- Overrides:
deepClonein classByteBufferKeyValue- Returns:
- The deep cloned cell
-