@InterfaceAudience.Public public interface Cell extends HeapSize
1) row 2) column family 3) column qualifier 4) timestamp 5) type 6) MVCC version 7) value
Uniqueness is determined by the combination of row, column family, column qualifier, timestamp, and type.
The natural comparator will perform a bitwise comparison on row, column family, and column qualifier. Less intuitively, it will then treat the greater timestamp as the lesser value with the goal of sorting newer cells first.
Cell implements Comparable<Cell> which is only meaningful when comparing to other keys in the same table. It uses CellComparator which does not work on the -ROOT- and hbase:meta tables.
In the future, we may consider adding a boolean isOnHeap() method and a getValueBuffer() method that can be used to pass a value directly from an off-heap ByteBuffer to the network without copying into an on-heap byte[].
Historic note: the original Cell implementation (KeyValue) requires that all fields be encoded as consecutive bytes in the same byte[], whereas this interface allows fields to reside in separate byte[]'s.
Modifier and Type | Interface and Description |
---|---|
static class |
Cell.Type
The valid types for user to build the cell.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
getFamilyArray()
Contiguous bytes composed of legal HDFS filename characters which may start at any index in the
containing array.
|
byte |
getFamilyLength()
Returns Number of family bytes.
|
int |
getFamilyOffset()
Returns Array index of first family byte
|
byte[] |
getQualifierArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getQualifierLength()
Returns Number of qualifier bytes.
|
int |
getQualifierOffset()
Returns Array index of first qualifier byte
|
byte[] |
getRowArray()
Contiguous raw bytes that may start at any index in the containing array.
|
short |
getRowLength()
Returns Number of row bytes.
|
int |
getRowOffset()
Returns Array index of first row byte
|
long |
getSequenceId()
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
|
int |
getSerializedSize()
Returns Serialized size (defaults to include tag length if has some tags).
|
byte[] |
getTagsArray()
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0. Tags are are now internal.
|
int |
getTagsLength()
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0. Tags are are now internal.
|
int |
getTagsOffset()
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0. Tags are are now internal.
|
long |
getTimestamp()
Return a long value representing time at which this cell was "Put" into the row.
|
default Cell.Type |
getType()
Returns the type of cell in a human readable format using
Cell.Type . |
byte |
getTypeByte()
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0. Use
getType() . |
byte[] |
getValueArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getValueLength()
Returns Number of value bytes.
|
int |
getValueOffset()
Returns Array index of first value byte
|
byte[] getRowArray()
int getRowOffset()
short getRowLength()
byte[] getFamilyArray()
int getFamilyOffset()
byte getFamilyLength()
byte[] getQualifierArray()
int getQualifierOffset()
int getQualifierLength()
long getTimestamp()
@Deprecated byte getTypeByte()
getType()
.@Deprecated long 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.byte[] getValueArray()
int getValueOffset()
int getValueLength()
int getSerializedSize()
@Deprecated byte[] getTagsArray()
@Deprecated int getTagsOffset()
@Deprecated int getTagsLength()
default Cell.Type getType()
Cell.Type
. Note : This does not
expose the internal types of Cells like KeyValue.Type.Maximum
and
KeyValue.Type.Minimum
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.