Package org.apache.hadoop.hbase
Interface RawCell
- All Known Subinterfaces:
ExtendedCell
- All Known Implementing Classes:
BufferedDataBlockEncoder.OffheapDecodedExtendedCell
,BufferedDataBlockEncoder.OnheapDecodedCell
,ByteBufferChunkKeyValue
,ByteBufferExtendedCell
,ByteBufferKeyOnlyKeyValue
,ByteBufferKeyValue
,IndividualBytesFieldCell
,KeyOnlyFilter.KeyOnlyByteBufferExtendedCell
,KeyOnlyFilter.KeyOnlyCell
,KeyValue
,KeyValue.KeyOnlyKeyValue
,MapReduceExtendedCell
,NoTagByteBufferChunkKeyValue
,NoTagsByteBufferKeyValue
,NoTagsKeyValue
,PrivateCellUtil.EmptyByteBufferExtendedCell
,PrivateCellUtil.EmptyCell
,PrivateCellUtil.FirstOnRowByteBufferExtendedCell
,PrivateCellUtil.FirstOnRowCell
,PrivateCellUtil.FirstOnRowColByteBufferExtendedCell
,PrivateCellUtil.FirstOnRowColCell
,PrivateCellUtil.FirstOnRowColTSByteBufferExtendedCell
,PrivateCellUtil.FirstOnRowColTSCell
,PrivateCellUtil.FirstOnRowDeleteFamilyCell
,PrivateCellUtil.LastOnRowByteBufferExtendedCell
,PrivateCellUtil.LastOnRowCell
,PrivateCellUtil.LastOnRowColByteBufferExtendedCell
,PrivateCellUtil.LastOnRowColCell
,PrivateCellUtil.TagRewriteByteBufferExtendedCell
,PrivateCellUtil.TagRewriteCell
,PrivateCellUtil.ValueAndTagRewriteByteBufferExtendedCell
,PrivateCellUtil.ValueAndTagRewriteCell
,SizeCachedByteBufferKeyValue
,SizeCachedKeyValue
,SizeCachedNoTagsByteBufferKeyValue
,SizeCachedNoTagsKeyValue
An extended version of Cell that allows CPs manipulate Tags.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkForTagsLength
(int tagsLength) Check the length of tags.default byte[]
Allows cloning the tags in the cell to a new byte[]static Cell
createCell
(Cell cell, List<Tag> tags) Returns A new cell which is having the extra tags also added to it.getTag
(byte type) Returns the specific tag of the given typegetTags()
Creates a list of tags in the current cellbyte[]
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
Return the first offset where the tags start in the CellMethods inherited from interface org.apache.hadoop.hbase.Cell
getFamilyArray, getFamilyLength, getFamilyOffset, getQualifierArray, getQualifierLength, getQualifierOffset, getRowArray, getRowLength, getRowOffset, getSerializedSize, getTimestamp, getType, getValueArray, getValueLength, getValueOffset
-
Field Details
-
MAX_TAGS_LENGTH
- See Also:
-
-
Method Details
-
getTagsArray
byte[] getTagsArray()Contiguous raw bytes representing tags that may start at any index in the containing array.- Returns:
- the tags byte array
-
getTagsOffset
int getTagsOffset()Return the first offset where the tags start in the Cell -
getTagsLength
int getTagsLength()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.- Returns:
- the total length of the tags in the Cell.
-
cloneTags
Allows cloning the tags in the cell to a new byte[]- Returns:
- the byte[] having the tags
-
getTags
Creates a list of tags in the current cell- Returns:
- a list of tags
-
getTag
Returns the specific tag of the given type- Parameters:
type
- the type of the tag- Returns:
- the specific tag if available or null
-
checkForTagsLength
Check the length of tags. If it is invalid, throw IllegalArgumentException- Parameters:
tagsLength
- the given length of tags- Throws:
IllegalArgumentException
- if tagslength is invalid
-
createCell
Returns A new cell which is having the extra tags also added to it.
-