Package org.apache.hadoop.hbase
Class PrivateCellUtil.ValueAndTagRewriteCell
java.lang.Object
org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteCell
org.apache.hadoop.hbase.PrivateCellUtil.ValueAndTagRewriteCell
- All Implemented Interfaces:
Cell
,ExtendedCell
,HeapSize
,RawCell
- Enclosing class:
- PrivateCellUtil
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteCell
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
-
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.int
Returns Number of value bytes.int
Returns Array index of first value bytelong
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.(package private) static int
write
(OutputStream out, boolean withTags, ExtendedCell cell, byte[] value, byte[] tags) Made into a static method so as to reuse the logic within ValueAndTagRewriteByteBufferExtendedCellvoid
write
(ByteBuffer buf, int offset) Write this Cell into the given buf's offset in aKeyValue
format.(package private) static void
write
(ByteBuffer buf, int offset, ExtendedCell cell, byte[] value, byte[] tags) Made into a static method so as to reuse the logic within ValueAndTagRewriteByteBufferExtendedCellMethods inherited from class org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteCell
getFamilyArray, getFamilyLength, getFamilyOffset, getQualifierArray, getQualifierLength, getQualifierOffset, getRowArray, getRowLength, getRowOffset, getSequenceId, getTagsArray, getTagsLength, getTagsOffset, 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, getType
-
Field Details
-
value
-
-
Constructor Details
-
ValueAndTagRewriteCell
-
-
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.TagRewriteCell
- 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.TagRewriteCell
-
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.TagRewriteCell
-
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.TagRewriteCell
-
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.TagRewriteCell
- Parameters:
out
- Stream to which cell has to be writtenwithTags
- Whether to write tags.- Returns:
- how many bytes are written.
- Throws:
IOException
-
write
static int write(OutputStream out, boolean withTags, ExtendedCell cell, byte[] value, byte[] tags) throws IOException Made into a static method so as to reuse the logic within ValueAndTagRewriteByteBufferExtendedCell- 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.TagRewriteCell
- 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.TagRewriteCell
- Parameters:
buf
- The buffer where to write the Cell.offset
- The offset within buffer, to write the Cell.
-
write
Made into a static method so as to reuse the logic within ValueAndTagRewriteByteBufferExtendedCell -
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.TagRewriteCell
- Returns:
- The deep cloned cell
-