protected static class BufferedDataBlockEncoder.OnheapDecodedCell extends Object implements ExtendedCell
| Modifier and Type | Field and Description |
|---|---|
private byte |
familyLength |
private int |
familyOffset |
private static long |
FIXED_OVERHEAD |
private byte[] |
keyOnlyBuffer |
private int |
qualifierLength |
private int |
qualifierOffset |
private short |
rowLength |
private long |
seqId |
private byte[] |
tagsBuffer |
private int |
tagsLength |
private int |
tagsOffset |
private long |
timestamp |
private byte |
typeByte |
private byte[] |
valueBuffer |
private int |
valueLength |
private int |
valueOffset |
CELL_NOT_BASED_ON_CHUNKMAX_TAGS_LENGTH| Modifier | Constructor and Description |
|---|---|
protected |
OnheapDecodedCell(byte[] keyBuffer,
short rowLength,
int familyOffset,
byte familyLength,
int qualOffset,
int qualLength,
long timeStamp,
byte typeByte,
byte[] valueBuffer,
int valueOffset,
int valueLen,
long seqId,
byte[] 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.
|
byte |
getFamilyLength() |
int |
getFamilyOffset() |
byte[] |
getQualifierArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getQualifierLength() |
int |
getQualifierOffset() |
byte[] |
getRowArray()
Contiguous raw bytes that may start at any index in the containing array.
|
short |
getRowLength() |
int |
getRowOffset() |
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.
|
int |
getTagsLength()
HBase internally uses 2 bytes to store tags length in Cell.
|
int |
getTagsOffset() |
long |
getTimestamp() |
byte |
getTypeByte() |
byte[] |
getValueArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getValueLength() |
int |
getValueOffset() |
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.
|
String |
toString() |
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, wait, wait, waitgetChunkId, getSerializedSizecheckForTagsLength, cloneTags, getTag, getTagsprivate static final long FIXED_OVERHEAD
private byte[] keyOnlyBuffer
private short rowLength
private int familyOffset
private byte familyLength
private int qualifierOffset
private int qualifierLength
private long timestamp
private byte typeByte
private byte[] valueBuffer
private int valueOffset
private int valueLength
private byte[] tagsBuffer
private int tagsOffset
private int tagsLength
private long seqId
protected OnheapDecodedCell(byte[] keyBuffer, short rowLength, int familyOffset, byte familyLength, int qualOffset, int qualLength, long timeStamp, byte typeByte, byte[] valueBuffer, int valueOffset, int valueLen, long seqId, byte[] tagsBuffer, int tagsOffset, int tagsLength)
public byte[] getRowArray()
CellgetRowArray in interface Cellpublic byte[] getFamilyArray()
CellgetFamilyArray in interface Cellpublic byte[] getQualifierArray()
CellgetQualifierArray in interface Cellpublic int getRowOffset()
getRowOffset in interface Cellpublic short getRowLength()
getRowLength in interface Cellpublic int getFamilyOffset()
getFamilyOffset in interface Cellpublic byte getFamilyLength()
getFamilyLength in interface Cellpublic int getQualifierOffset()
getQualifierOffset in interface Cellpublic int getQualifierLength()
getQualifierLength in interface Cellpublic long getTimestamp()
getTimestamp in interface Cellpublic byte getTypeByte()
getTypeByte in interface CellgetTypeByte in interface ExtendedCellpublic 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.getSequenceId in interface CellgetSequenceId in interface ExtendedCellpublic byte[] getValueArray()
CellgetValueArray in interface Cellpublic int getValueOffset()
getValueOffset in interface Cellpublic int getValueLength()
getValueLength in interface Cellpublic byte[] getTagsArray()
ExtendedCellgetTagsArray in interface CellgetTagsArray in interface ExtendedCellpublic int getTagsOffset()
getTagsOffset in interface CellgetTagsOffset in interface ExtendedCellpublic int getTagsLength()
ExtendedCellgetTagsLength in interface CellgetTagsLength in interface ExtendedCellpublic void setSequenceId(long seqId)
ExtendedCellsetSequenceId in interface ExtendedCellseqId - sequence IDpublic long heapSize()
public 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>write in interface ExtendedCellout - Stream to which cell has to be writtenwithTags - Whether to write tags.IOExceptionpublic int getSerializedSize(boolean withTags)
getSerializedSize in interface ExtendedCellwithTags - 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 write(ByteBuffer buf, int offset)
ExtendedCellKeyValue format.write in interface ExtendedCellbuf - The buffer where to write the Cell.offset - The offset within buffer, to write the Cell.public void setTimestamp(long ts) throws IOException
ExtendedCellsetTimestamp in interface ExtendedCellts - timestampIOExceptionpublic void setTimestamp(byte[] ts) throws IOException
ExtendedCellsetTimestamp in interface ExtendedCellts - buffer containing the timestamp valueIOExceptionpublic ExtendedCell deepClone()
ExtendedCelldeepClone in interface ExtendedCellCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.