Package org.apache.hadoop.hbase
Class PrivateCellUtil.ValueAndTagRewriteByteBufferExtendedCell
java.lang.Object
org.apache.hadoop.hbase.ByteBufferExtendedCell
org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteByteBufferExtendedCell
org.apache.hadoop.hbase.PrivateCellUtil.ValueAndTagRewriteByteBufferExtendedCell
- All Implemented Interfaces:
Cell
,ExtendedCell
,HeapSize
,RawCell
- Enclosing class:
- PrivateCellUtil
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteByteBufferExtendedCell
cell, tags
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
ConstructorDescriptionValueAndTagRewriteByteBufferExtendedCell
(ByteBufferExtendedCell cell, byte[] value, byte[] tags) -
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 that may start at any index in the containing array.Returns TheByteBuffer
containing the value bytes.int
Returns Number of value bytes.int
Returns Array index of first value byteint
Returns Position in theByteBuffer
where value bytes startlong
heapSize()
Return the approximate 'exclusive deep size' of implementing object.int
write
(OutputStream out, boolean withTags) Write this cell to an OutputStream in aKeyValue
format.void
write
(ByteBuffer buf, int offset) Write this Cell into the given buf's offset in aKeyValue
format.Methods inherited from class org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteByteBufferExtendedCell
getFamilyArray, getFamilyByteBuffer, getFamilyLength, getFamilyOffset, getFamilyPosition, getQualifierArray, getQualifierByteBuffer, getQualifierLength, getQualifierOffset, getQualifierPosition, getRowArray, getRowByteBuffer, getRowLength, getRowOffset, getRowPosition, getSequenceId, getTagsArray, getTagsByteBuffer, getTagsLength, getTagsOffset, getTagsPosition, getTimestamp, getTypeByte, setSequenceId, setTimestamp, setTimestamp
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.ExtendedCell
getChunkId, getSerializedSize
-
Field Details
-
value
-
-
Constructor Details
-
ValueAndTagRewriteByteBufferExtendedCell
public ValueAndTagRewriteByteBufferExtendedCell(ByteBufferExtendedCell cell, byte[] value, byte[] tags)
-
-
Method Details
-
getValueArray
Description copied from interface:Cell
Contiguous raw bytes that may start at any index in the containing array. Max length is Integer.MAX_VALUE which is 2,147,483,647 bytes.- Specified by:
getValueArray
in interfaceCell
- Overrides:
getValueArray
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
- Returns:
- The array containing the value bytes.
-
getValueOffset
Description copied from interface:Cell
Returns Array index of first value byte- Specified by:
getValueOffset
in interfaceCell
- Overrides:
getValueOffset
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
getValueLength
Description copied from interface:Cell
Returns Number of value bytes. Must be < valueArray.length - offset.- Specified by:
getValueLength
in interfaceCell
- Overrides:
getValueLength
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
getValueByteBuffer
Description copied from class:ByteBufferExtendedCell
Returns TheByteBuffer
containing the value bytes.- Overrides:
getValueByteBuffer
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
getValuePosition
Description copied from class:ByteBufferExtendedCell
Returns Position in theByteBuffer
where value bytes start- Overrides:
getValuePosition
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
heapSize
Description copied from interface:HeapSize
Return the approximate 'exclusive deep size' of implementing object. Includes count of payload and hosting object sizings.- Specified by:
heapSize
in interfaceHeapSize
- Overrides:
heapSize
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
write
Description copied from interface:ExtendedCell
Write this cell to an OutputStream in aKeyValue
format.
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:
write
in interfaceExtendedCell
- Overrides:
write
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
- Parameters:
out
- Stream to which cell has to be writtenwithTags
- Whether to write tags.- Returns:
- how many bytes are written.
- Throws:
IOException
-
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 classPrivateCellUtil.TagRewriteByteBufferExtendedCell
- Parameters:
withTags
- Whether to write tags.- Returns:
- Bytes count required to serialize this Cell in a
KeyValue
format.
-
write
Description copied from interface:ExtendedCell
Write this Cell into the given buf's offset in aKeyValue
format.- Specified by:
write
in interfaceExtendedCell
- Overrides:
write
in classPrivateCellUtil.TagRewriteByteBufferExtendedCell
- Parameters:
buf
- The buffer where to write the Cell.offset
- The offset within buffer, to write the Cell.
-
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 classPrivateCellUtil.TagRewriteByteBufferExtendedCell
- Returns:
- The deep cloned cell
-