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
FieldsFields inherited from class org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteCell
cell, tagsFields 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
Constructors -
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 that may start at any index in the containing array.intReturns Number of value bytes.intReturns Array index of first value bytelongheapSize()Return the approximate 'exclusive deep size' of implementing object.intwrite(OutputStream out, boolean withTags) Write this cell to an OutputStream in aKeyValueformat.(package private) static intwrite(OutputStream out, boolean withTags, ExtendedCell cell, byte[] value, byte[] tags) Made into a static method so as to reuse the logic within ValueAndTagRewriteByteBufferExtendedCellvoidwrite(ByteBuffer buf, int offset) Write this Cell into the given buf's offset in aKeyValueformat.(package private) static voidwrite(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, setTimestampMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.ExtendedCell
getChunkId, getSerializedSize, getType
-
Field Details
-
value
-
-
Constructor Details
-
ValueAndTagRewriteCell
-
-
Method Details
-
getValueArray
Description copied from interface:CellContiguous 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:
getValueArrayin interfaceCell- Overrides:
getValueArrayin classPrivateCellUtil.TagRewriteCell- Returns:
- The array containing the value bytes.
-
getValueOffset
Description copied from interface:CellReturns Array index of first value byte- Specified by:
getValueOffsetin interfaceCell- Overrides:
getValueOffsetin classPrivateCellUtil.TagRewriteCell
-
getValueLength
Description copied from interface:CellReturns Number of value bytes. Must be < valueArray.length - offset.- Specified by:
getValueLengthin interfaceCell- Overrides:
getValueLengthin classPrivateCellUtil.TagRewriteCell
-
heapSize
Description copied from interface:HeapSizeReturn the approximate 'exclusive deep size' of implementing object. Includes count of payload and hosting object sizings.- Specified by:
heapSizein interfaceHeapSize- Overrides:
heapSizein classPrivateCellUtil.TagRewriteCell
-
write
Description copied from interface:ExtendedCellWrite this cell to an OutputStream in aKeyValueformat.
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:
writein interfaceExtendedCell- Overrides:
writein 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: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 classPrivateCellUtil.TagRewriteCell- Parameters:
withTags- Whether to write tags.- Returns:
- Bytes count required to serialize this Cell in a
KeyValueformat.
-
write
Description copied from interface:ExtendedCellWrite this Cell into the given buf's offset in aKeyValueformat.- Specified by:
writein interfaceExtendedCell- Overrides:
writein 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: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 classPrivateCellUtil.TagRewriteCell- Returns:
- The deep cloned cell
-