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
FieldsFields inherited from class org.apache.hadoop.hbase.PrivateCellUtil.TagRewriteByteBufferExtendedCell
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
ConstructorsConstructorDescriptionValueAndTagRewriteByteBufferExtendedCell(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.intgetSerializedSize(boolean withTags) KeyValue formatbyte[]Contiguous raw bytes that may start at any index in the containing array.Returns TheByteBuffercontaining the value bytes.intReturns Number of value bytes.intReturns Array index of first value byteintReturns Position in theByteBufferwhere value bytes startlongheapSize()Return the approximate 'exclusive deep size' of implementing object.intwrite(OutputStream out, boolean withTags) Write this cell to an OutputStream in aKeyValueformat.voidwrite(ByteBuffer buf, int offset) Write this Cell into the given buf's offset in aKeyValueformat.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, 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
-
Field Details
-
value
-
-
Constructor Details
-
ValueAndTagRewriteByteBufferExtendedCell
public ValueAndTagRewriteByteBufferExtendedCell(ByteBufferExtendedCell cell, byte[] value, byte[] tags)
-
-
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.TagRewriteByteBufferExtendedCell- 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.TagRewriteByteBufferExtendedCell
-
getValueLength
Description copied from interface:CellReturns Number of value bytes. Must be < valueArray.length - offset.- Specified by:
getValueLengthin interfaceCell- Overrides:
getValueLengthin classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
getValueByteBuffer
Description copied from class:ByteBufferExtendedCellReturns TheByteBuffercontaining the value bytes.- Overrides:
getValueByteBufferin classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
getValuePosition
Description copied from class:ByteBufferExtendedCellReturns Position in theByteBufferwhere value bytes start- Overrides:
getValuePositionin classPrivateCellUtil.TagRewriteByteBufferExtendedCell
-
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.TagRewriteByteBufferExtendedCell
-
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.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: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.TagRewriteByteBufferExtendedCell- 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.TagRewriteByteBufferExtendedCell- Parameters:
buf- The buffer where to write the Cell.offset- The offset within buffer, to write the Cell.
-
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.TagRewriteByteBufferExtendedCell- Returns:
- The deep cloned cell
-