static class PrivateCellUtil.ValueAndTagRewriteByteBufferExtendedCell extends PrivateCellUtil.TagRewriteByteBufferExtendedCell
Modifier and Type | Field and Description |
---|---|
protected byte[] |
value |
cell, tags
CELL_NOT_BASED_ON_CHUNK
MAX_TAGS_LENGTH
Constructor and Description |
---|
ValueAndTagRewriteByteBufferExtendedCell(ByteBufferExtendedCell cell,
byte[] value,
byte[] tags) |
Modifier and Type | Method and Description |
---|---|
ExtendedCell |
deepClone()
Does a deep copy of the contents to a new memory area and returns it as a new cell.
|
int |
getSerializedSize(boolean withTags)
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> |
byte[] |
getValueArray()
Contiguous raw bytes that may start at any index in the containing array.
|
ByteBuffer |
getValueByteBuffer()
Returns The
ByteBuffer containing the value bytes. |
int |
getValueLength()
Returns Number of value bytes.
|
int |
getValueOffset()
Returns Array index of first value byte
|
int |
getValuePosition()
Returns Position in the
ByteBuffer where value bytes start |
long |
heapSize()
Return the approximate 'exclusive deep size' of implementing object.
|
void |
write(ByteBuffer buf,
int offset)
Write this Cell into the given buf's offset in a
KeyValue format. |
int |
write(OutputStream out,
boolean withTags)
Write this cell to an OutputStream in a
KeyValue format. |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChunkId, getSerializedSize
checkForTagsLength, cloneTags, createCell, getTag, getTags
protected byte[] value
public ValueAndTagRewriteByteBufferExtendedCell(ByteBufferExtendedCell cell, byte[] value, byte[] tags)
public byte[] getValueArray()
Cell
getValueArray
in interface Cell
getValueArray
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
public int getValueOffset()
Cell
getValueOffset
in interface Cell
getValueOffset
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
public int getValueLength()
Cell
getValueLength
in interface Cell
getValueLength
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
public ByteBuffer getValueByteBuffer()
ByteBufferExtendedCell
ByteBuffer
containing the value bytes.getValueByteBuffer
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
public int getValuePosition()
ByteBufferExtendedCell
ByteBuffer
where value bytes startgetValuePosition
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
public long heapSize()
HeapSize
heapSize
in interface HeapSize
heapSize
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
public int write(OutputStream out, boolean withTags) throws IOException
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>
write
in interface ExtendedCell
write
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
out
- Stream to which cell has to be writtenwithTags
- Whether to write tags.IOException
public int getSerializedSize(boolean withTags)
ExtendedCell
<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>
getSerializedSize
in interface ExtendedCell
getSerializedSize
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
withTags
- Whether to write tags.KeyValue
format.public void write(ByteBuffer buf, int offset)
ExtendedCell
KeyValue
format.write
in interface ExtendedCell
write
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
buf
- The buffer where to write the Cell.offset
- The offset within buffer, to write the Cell.public ExtendedCell deepClone()
ExtendedCell
deepClone
in interface ExtendedCell
deepClone
in class PrivateCellUtil.TagRewriteByteBufferExtendedCell
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.