protected static class BufferedDataBlockEncoder.OffheapDecodedExtendedCell extends ByteBufferExtendedCell
| Modifier and Type | Field and Description |
|---|---|
private byte |
familyLength |
private int |
familyOffset |
private static long |
FIXED_OVERHEAD |
private ByteBuffer |
keyBuffer |
private int |
qualifierLength |
private int |
qualifierOffset |
private short |
rowLength |
private long |
seqId |
private ByteBuffer |
tagsBuffer |
private int |
tagsLength |
private int |
tagsOffset |
private long |
timestamp |
private byte |
typeByte |
private ByteBuffer |
valueBuffer |
private int |
valueLength |
private int |
valueOffset |
CELL_NOT_BASED_ON_CHUNKMAX_TAGS_LENGTH| Modifier | Constructor and Description |
|---|---|
protected |
OffheapDecodedExtendedCell(ByteBuffer keyBuffer,
short rowLength,
int familyOffset,
byte familyLength,
int qualOffset,
int qualLength,
long timeStamp,
byte typeByte,
ByteBuffer valueBuffer,
int valueOffset,
int valueLen,
long seqId,
ByteBuffer tagsBuffer,
int tagsOffset,
int tagsLength) |
| 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.
|
byte[] |
getFamilyArray()
Contiguous bytes composed of legal HDFS filename characters which may start at any index in the
containing array.
|
ByteBuffer |
getFamilyByteBuffer() |
byte |
getFamilyLength() |
int |
getFamilyOffset() |
int |
getFamilyPosition() |
byte[] |
getQualifierArray()
Contiguous raw bytes that may start at any index in the containing array.
|
ByteBuffer |
getQualifierByteBuffer() |
int |
getQualifierLength() |
int |
getQualifierOffset() |
int |
getQualifierPosition() |
byte[] |
getRowArray()
Contiguous raw bytes that may start at any index in the containing array.
|
ByteBuffer |
getRowByteBuffer() |
short |
getRowLength() |
int |
getRowOffset() |
int |
getRowPosition() |
long |
getSequenceId()
A region-specific unique monotonically increasing sequence ID given to each Cell.
|
int |
getSerializedSize(boolean withTags) |
byte[] |
getTagsArray()
Contiguous raw bytes representing tags that may start at any index in the containing array.
|
ByteBuffer |
getTagsByteBuffer() |
int |
getTagsLength()
HBase internally uses 2 bytes to store tags length in Cell.
|
int |
getTagsOffset() |
int |
getTagsPosition() |
long |
getTimestamp() |
byte |
getTypeByte() |
byte[] |
getValueArray()
Contiguous raw bytes that may start at any index in the containing array.
|
ByteBuffer |
getValueByteBuffer() |
int |
getValueLength() |
int |
getValueOffset() |
int |
getValuePosition() |
long |
heapSize() |
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.
|
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChunkId, getSerializedSizecheckForTagsLength, cloneTags, getTag, getTagsprivate static final long FIXED_OVERHEAD
private ByteBuffer keyBuffer
private short rowLength
private int familyOffset
private byte familyLength
private int qualifierOffset
private int qualifierLength
private long timestamp
private byte typeByte
private ByteBuffer valueBuffer
private int valueOffset
private int valueLength
private ByteBuffer tagsBuffer
private int tagsOffset
private int tagsLength
private long seqId
protected OffheapDecodedExtendedCell(ByteBuffer keyBuffer, short rowLength, int familyOffset, byte familyLength, int qualOffset, int qualLength, long timeStamp, byte typeByte, ByteBuffer valueBuffer, int valueOffset, int valueLen, long seqId, ByteBuffer tagsBuffer, int tagsOffset, int tagsLength)
public byte[] getRowArray()
Cellpublic int getRowOffset()
public short getRowLength()
public byte[] getFamilyArray()
Cellpublic int getFamilyOffset()
public byte getFamilyLength()
public byte[] getQualifierArray()
Cellpublic int getQualifierOffset()
public int getQualifierLength()
public long getTimestamp()
public byte getTypeByte()
public long getSequenceId()
ExtendedCellHConstants.KEEP_SEQID_PERIOD days, but generally becomes irrelevant after the cell's
row is no longer involved in any operations that require strict consistency.public byte[] getValueArray()
Cellpublic int getValueOffset()
public int getValueLength()
public byte[] getTagsArray()
ExtendedCellpublic int getTagsOffset()
public int getTagsLength()
ExtendedCellpublic ByteBuffer getRowByteBuffer()
getRowByteBuffer in class ByteBufferExtendedCellByteBuffer containing the row bytes.public int getRowPosition()
getRowPosition in class ByteBufferExtendedCellByteBuffer where row bytes startpublic ByteBuffer getFamilyByteBuffer()
getFamilyByteBuffer in class ByteBufferExtendedCellByteBuffer containing the column family bytes.public int getFamilyPosition()
getFamilyPosition in class ByteBufferExtendedCellByteBuffer where column family bytes startpublic ByteBuffer getQualifierByteBuffer()
getQualifierByteBuffer in class ByteBufferExtendedCellByteBuffer containing the column qualifier bytes.public int getQualifierPosition()
getQualifierPosition in class ByteBufferExtendedCellByteBuffer where column qualifier bytes startpublic ByteBuffer getValueByteBuffer()
getValueByteBuffer in class ByteBufferExtendedCellByteBuffer containing the value bytes.public int getValuePosition()
getValuePosition in class ByteBufferExtendedCellByteBuffer where value bytes startpublic ByteBuffer getTagsByteBuffer()
getTagsByteBuffer in class ByteBufferExtendedCellByteBuffer containing the tag bytes.public int getTagsPosition()
getTagsPosition in class ByteBufferExtendedCellByteBuffer where tag bytes startpublic long heapSize()
public void setSequenceId(long seqId)
ExtendedCellseqId - sequence IDpublic int write(OutputStream out, boolean withTags) throws IOException
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>out - Stream to which cell has to be writtenwithTags - Whether to write tags.IOExceptionpublic int getSerializedSize(boolean withTags)
withTags - Whether to write tags.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>public void setTimestamp(long ts) throws IOException
ExtendedCellts - timestampIOExceptionpublic void setTimestamp(byte[] ts) throws IOException
ExtendedCellts - buffer containing the timestamp valueIOExceptionpublic void write(ByteBuffer buf, int offset)
ExtendedCellKeyValue format.buf - The buffer where to write the Cell.offset - The offset within buffer, to write the Cell.public ExtendedCell deepClone()
ExtendedCellCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.