Package org.apache.hadoop.hbase
Class IndividualBytesFieldCell
java.lang.Object
org.apache.hadoop.hbase.IndividualBytesFieldCell
- All Implemented Interfaces:
Cloneable
,Cell
,ExtendedCell
,HeapSize
,RawCell
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final byte[]
private static final long
private final int
private final int
private final int
private final int
private final byte[]
private final int
private final int
private final byte[]
private long
private final byte[]
private final int
private final int
private long
private final byte
private final byte[]
private final int
private final int
Fields inherited from interface org.apache.hadoop.hbase.ExtendedCell
CELL_NOT_BASED_ON_CHUNK
Fields inherited from interface org.apache.hadoop.hbase.RawCell
MAX_TAGS_LENGTH
-
Constructor Summary
ConstructorDescriptionIndividualBytesFieldCell
(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) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkArrayBounds
(byte[] bytes, int offset, int length) clone()
Implement Cloneable interfacebyte[]
Contiguous bytes composed of legal HDFS filename characters which may start at any index in the containing array.byte
Returns Number of family bytes.int
Returns Array index of first family bytebyte[]
Contiguous raw bytes that may start at any index in the containing array.int
Returns Number of qualifier bytes.int
Returns Array index of first qualifier bytebyte[]
Implement Cell interfaceshort
Returns Number of row bytes.int
Returns Array index of first row bytelong
A region-specific unique monotonically increasing sequence ID given to each Cell.byte[]
Contiguous raw bytes representing tags that may start at any index in the containing array.int
HBase internally uses 2 bytes to store tags length in Cell.int
Returns the first offset where the tags start in the Celllong
Return a long value representing time at which this cell was "Put" into the row.byte
Returns The byte representation of the KeyValue.TYPE of this cell: one of Put, Delete, etcbyte[]
Contiguous raw bytes that may start at any index in the containing array.int
Returns Number of value bytes.int
Returns Array index of first value byteprivate long
long
heapSize()
Implement HeapSize interfacevoid
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.toString()
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.ExtendedCell
deepClone, getChunkId, getSerializedSize, getSerializedSize, write, write
-
Field Details
-
FIXED_OVERHEAD
-
row
-
rOffset
-
rLength
-
family
-
fOffset
-
fLength
-
qualifier
-
qOffset
-
qLength
-
value
-
vOffset
-
vLength
-
tags
-
tagsOffset
-
tagsLength
-
timestamp
-
type
-
seqId
-
-
Constructor Details
-
IndividualBytesFieldCell
public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier, long timestamp, KeyValue.Type type, byte[] value) -
IndividualBytesFieldCell
public IndividualBytesFieldCell(byte[] row, byte[] family, byte[] qualifier, long timestamp, KeyValue.Type type, long seqId, byte[] value, byte[] tags) -
IndividualBytesFieldCell
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)
-
-
Method Details
-
checkArrayBounds
-
heapOverhead
-
getRowArray
Implement Cell interface- Specified by:
getRowArray
in interfaceCell
- Returns:
- The array containing the row bytes.
-
getRowOffset
Description copied from interface:Cell
Returns Array index of first row byte- Specified by:
getRowOffset
in interfaceCell
-
getRowLength
Description copied from interface:Cell
Returns Number of row bytes. Must be < rowArray.length - offset.- Specified by:
getRowLength
in interfaceCell
-
getFamilyArray
Description copied from interface:Cell
Contiguous bytes composed of legal HDFS filename characters which may start at any index in the containing array. Max length is Byte.MAX_VALUE, which is 127 bytes.- Specified by:
getFamilyArray
in interfaceCell
- Returns:
- the array containing the family bytes.
-
getFamilyOffset
Description copied from interface:Cell
Returns Array index of first family byte- Specified by:
getFamilyOffset
in interfaceCell
-
getFamilyLength
Description copied from interface:Cell
Returns Number of family bytes. Must be < familyArray.length - offset.- Specified by:
getFamilyLength
in interfaceCell
-
getQualifierArray
Description copied from interface:Cell
Contiguous raw bytes that may start at any index in the containing array.- Specified by:
getQualifierArray
in interfaceCell
- Returns:
- The array containing the qualifier bytes.
-
getQualifierOffset
Description copied from interface:Cell
Returns Array index of first qualifier byte- Specified by:
getQualifierOffset
in interfaceCell
-
getQualifierLength
Description copied from interface:Cell
Returns Number of qualifier bytes. Must be < qualifierArray.length - offset.- Specified by:
getQualifierLength
in interfaceCell
-
getTimestamp
Description copied from interface:Cell
Return a long value representing time at which this cell was "Put" into the row. Typically represents the time of insertion, but can be any value from 0 to Long.MAX_VALUE.- Specified by:
getTimestamp
in interfaceCell
-
getTypeByte
Description copied from interface:ExtendedCell
Returns The byte representation of the KeyValue.TYPE of this cell: one of Put, Delete, etc- Specified by:
getTypeByte
in interfaceCell
- Specified by:
getTypeByte
in interfaceExtendedCell
-
getSequenceId
Description copied from interface:ExtendedCell
A region-specific unique monotonically increasing sequence ID given to each Cell. It always exists for cells in the memstore but is not retained forever. It will be kept forHConstants.KEEP_SEQID_PERIOD
days, but generally becomes irrelevant after the cell's row is no longer involved in any operations that require strict consistency.- Specified by:
getSequenceId
in interfaceCell
- Specified by:
getSequenceId
in interfaceExtendedCell
- Returns:
- seqId (always > 0 if exists), or 0 if it no longer exists
-
getValueArray
Description copied from interface:Cell
Contiguous raw bytes that may start at any index in the containing array. Max length is Integer.MAX_VALUE which is 2,147,483,647 bytes.- Specified by:
getValueArray
in interfaceCell
- Returns:
- The array containing the value bytes.
-
getValueOffset
Description copied from interface:Cell
Returns Array index of first value byte- Specified by:
getValueOffset
in interfaceCell
-
getValueLength
Description copied from interface:Cell
Returns Number of value bytes. Must be < valueArray.length - offset.- Specified by:
getValueLength
in interfaceCell
-
getTagsArray
Description copied from interface:ExtendedCell
Contiguous raw bytes representing tags that may start at any index in the containing array.- Specified by:
getTagsArray
in interfaceCell
- Specified by:
getTagsArray
in interfaceExtendedCell
- Returns:
- the tags byte array
-
getTagsOffset
Description copied from interface:ExtendedCell
Returns the first offset where the tags start in the Cell- Specified by:
getTagsOffset
in interfaceCell
- Specified by:
getTagsOffset
in interfaceExtendedCell
-
getTagsLength
Description copied from interface:ExtendedCell
HBase internally uses 2 bytes to store tags length in Cell. As the tags length is always a non-negative number, to make good use of the sign bit, the max of tags length is defined 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.- Specified by:
getTagsLength
in interfaceCell
- Specified by:
getTagsLength
in interfaceExtendedCell
- Returns:
- the total length of the tags in the Cell.
-
heapSize
Implement HeapSize interface -
clone
Implement Cloneable interface- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
setSequenceId
Description copied from interface:ExtendedCell
Sets with the given seqId.- Specified by:
setSequenceId
in interfaceExtendedCell
- Parameters:
seqId
- sequence ID
-
setTimestamp
Description copied from interface:ExtendedCell
Sets with the given timestamp.- Specified by:
setTimestamp
in interfaceExtendedCell
- Parameters:
ts
- timestamp
-
setTimestamp
Description copied from interface:ExtendedCell
Sets with the given timestamp.- Specified by:
setTimestamp
in interfaceExtendedCell
- Parameters:
ts
- buffer containing the timestamp value
-
toString
-