@InterfaceAudience.Private public class IndividualBytesFieldCell extends Object implements ExtendedCell
CELL_NOT_BASED_ON_CHUNK| Constructor and Description |
|---|
IndividualBytesFieldCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
KeyValue.Type type,
byte[] value) |
IndividualBytesFieldCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
KeyValue.Type type,
long seqId,
byte[] value,
byte[] tags) |
IndividualBytesFieldCell(byte[] row,
int rOffset,
int rLength,
byte[] family,
int fOffset,
int fLength,
byte[] qualifier,
int qOffset,
int qLength,
long timestamp,
KeyValue.Type type,
long seqId,
byte[] value,
int vOffset,
int vLength,
byte[] tags,
int tagsOffset,
int tagsLength) |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Implement Cloneable interface
|
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()
Implement Cell interface
|
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()
Implement HeapSize interface
|
void |
setSequenceId(long seqId)
Implement SettableSequenceId interface
|
void |
setTimestamp(byte[] ts,
int tsOffset)
Sets with the given timestamp.
|
void |
setTimestamp(long ts)
Implement SettableTimestamp interface
|
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. |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetChunkIdpublic IndividualBytesFieldCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
KeyValue.Type type,
byte[] value)
public IndividualBytesFieldCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
KeyValue.Type type,
long seqId,
byte[] value,
byte[] tags)
public IndividualBytesFieldCell(byte[] row,
int rOffset,
int rLength,
byte[] family,
int fOffset,
int fLength,
byte[] qualifier,
int qOffset,
int qLength,
long timestamp,
KeyValue.Type type,
long seqId,
byte[] value,
int vOffset,
int vLength,
byte[] tags,
int tagsOffset,
int tagsLength)
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 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 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 ExtendedCell deepClone()
ExtendedCelldeepClone in interface ExtendedCellpublic byte[] getRowArray()
getRowArray in interface Cellpublic int getRowOffset()
getRowOffset in interface Cellpublic short getRowLength()
getRowLength in interface Cellpublic byte[] getFamilyArray()
CellgetFamilyArray in interface Cellpublic int getFamilyOffset()
getFamilyOffset in interface Cellpublic byte getFamilyLength()
getFamilyLength in interface Cellpublic byte[] getQualifierArray()
CellgetQualifierArray 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 Cellpublic long getSequenceId()
CellHConstants.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 Cellpublic byte[] getValueArray()
CellgetValueArray in interface Cellpublic int getValueOffset()
getValueOffset in interface Cellpublic int getValueLength()
getValueLength in interface Cellpublic byte[] getTagsArray()
CellgetTagsArray in interface Cellpublic int getTagsOffset()
getTagsOffset in interface Cellpublic int getTagsLength()
CellTagUtil.MAX_TAGS_LENGTH, which is 2 * Short.MAX_VALUE + 1 = 65535.
As a result, the return type is int, because a short is not capable of handling that.
Please note that even if the return type is int, the max tags length is far less than Integer.MAX_VALUE.getTagsLength in interface Cellpublic long heapSize()
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic void setSequenceId(long seqId)
setSequenceId in interface SettableSequenceIdpublic void setTimestamp(long ts)
setTimestamp in interface SettableTimestamppublic void setTimestamp(byte[] ts,
int tsOffset)
SettableTimestampsetTimestamp in interface SettableTimestampts - buffer containing the timestamp valuetsOffset - offset to the new timestampCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.