@InterfaceAudience.Private public interface ExtendedCell extends RawCell, HeapSize
Cell with server side required functions. Server side Cell implementations
must implement this.| Modifier and Type | Field and Description |
|---|---|
static int |
CELL_NOT_BASED_ON_CHUNK |
MAX_TAGS_LENGTH| Modifier and Type | Method and Description |
|---|---|
default ExtendedCell |
deepClone()
Does a deep copy of the contents to a new memory area and returns it as a new cell.
|
default int |
getChunkId()
Extracts the id of the backing bytebuffer of this cell if it was obtained from fixed sized
chunks as in case of MemstoreLAB
|
long |
getSequenceId()
A region-specific unique monotonically increasing sequence ID given to each Cell.
|
default int |
getSerializedSize()
Returns Serialized size (defaults to include tag length).
|
default 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[] |
getTagsArray()
Contiguous raw bytes representing tags that may start at any index in the containing array.
|
int |
getTagsLength()
HBase internally uses 2 bytes to store tags length in Cell.
|
int |
getTagsOffset()
Returns the first offset where the tags start in the Cell
|
byte |
getTypeByte()
Returns The byte representation of the KeyValue.TYPE of this cell: one of Put, Delete, etc
|
void |
setSequenceId(long seqId)
Sets with the given seqId.
|
void |
setTimestamp(byte[] ts)
Sets with the given timestamp.
|
void |
setTimestamp(long ts)
Sets with the given timestamp.
|
default void |
write(ByteBuffer buf,
int offset)
Write this Cell into the given buf's offset in a
KeyValue format. |
default int |
write(OutputStream out,
boolean withTags)
Write this cell to an OutputStream in a
KeyValue format. |
checkForTagsLength, cloneTags, createCell, getTag, getTagsgetFamilyArray, getFamilyLength, getFamilyOffset, getQualifierArray, getQualifierLength, getQualifierOffset, getRowArray, getRowLength, getRowOffset, getTimestamp, getType, getValueArray, getValueLength, getValueOffsetstatic final int CELL_NOT_BASED_ON_CHUNK
default int write(OutputStream out, boolean withTags) throws IOException
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>out - Stream to which cell has to be writtenwithTags - Whether to write tags.IOExceptiondefault int getSerializedSize(boolean withTags)
<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>withTags - Whether to write tags.KeyValue format.default int getSerializedSize()
getSerializedSize in interface Celldefault void write(ByteBuffer buf, int offset)
KeyValue format.buf - The buffer where to write the Cell.offset - The offset within buffer, to write the Cell.default ExtendedCell deepClone()
default int getChunkId()
CELL_NOT_BASED_ON_CHUNK; i.e. -1.void setSequenceId(long seqId) throws IOException
seqId - sequence IDIOExceptionvoid setTimestamp(long ts) throws IOException
ts - timestampIOExceptionvoid setTimestamp(byte[] ts) throws IOException
ts - buffer containing the timestamp valueIOExceptionlong getSequenceId()
HConstants.KEEP_SEQID_PERIOD days, but generally becomes irrelevant after the cell's
row is no longer involved in any operations that require strict consistency.getSequenceId in interface Cellbyte[] getTagsArray()
getTagsArray in interface Cellint getTagsOffset()
getTagsOffset in interface Cellint getTagsLength()
getTagsLength in interface Cellbyte getTypeByte()
getTypeByte in interface CellCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.