Class ByteBufferExtendedCell
- All Implemented Interfaces:
Cell
,ExtendedCell
,HeapSize
,RawCell
- Direct Known Subclasses:
BufferedDataBlockEncoder.OffheapDecodedExtendedCell
,ByteBufferKeyOnlyKeyValue
,ByteBufferKeyValue
,KeyOnlyFilter.KeyOnlyByteBufferExtendedCell
,MapReduceExtendedCell
,PrivateCellUtil.EmptyByteBufferExtendedCell
,PrivateCellUtil.TagRewriteByteBufferExtendedCell
Cell
interface. It is used when the Cell is
backed by a ByteBuffer
: i.e. cell instanceof ByteBufferedCell
.
This class has getters for the row, column family, column qualifier, value and tags hosting
ByteBuffers. It also has getters of the *position* within a ByteBuffer where these field bytes
begin. These are needed because a single ByteBuffer may back one or many Cell instances -- it
depends on the implementation -- so the ByteBuffer position as returned by
ByteBuffer.arrayOffset()
cannot be relied upon. Also, do not confuse these position
methods with the getXXXOffset methods from the super Interface, Cell
; dependent up on
implementation, the Cell getXXXOffset methods can return the same value as a call to its
equivalent position method from below BUT they can also stray; if a ByteBufferedCell, use the
below position methods to find where a field begins.
Use the getXXXLength methods from Cell to find a fields length.
A Cell object can be of this type only on the server side.
WARNING: If a Cell is backed by an offheap ByteBuffer, any call to getXXXArray() will result in a temporary byte array creation and a bytes copy. Avoid these allocations by using the appropriate Cell access server-side: i.e. ByteBufferedCell when backed by a ByteBuffer and Cell when it is not.
-
Nested Class Summary
-
Field Summary
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
-
Method Summary
Modifier and TypeMethodDescriptionabstract ByteBuffer
Returns TheByteBuffer
containing the column family bytes.abstract int
Returns Position in theByteBuffer
where column family bytes startabstract ByteBuffer
Returns TheByteBuffer
containing the column qualifier bytes.abstract int
Returns Position in theByteBuffer
where column qualifier bytes startabstract ByteBuffer
Returns TheByteBuffer
containing the row bytes.abstract int
Returns Position in theByteBuffer
where row bytes startabstract ByteBuffer
Returns TheByteBuffer
containing the tag bytes.abstract int
Returns Position in theByteBuffer
where tag bytes startabstract ByteBuffer
Returns TheByteBuffer
containing the value bytes.abstract int
Returns Position in theByteBuffer
where value bytes startMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.Cell
getFamilyArray, getFamilyLength, getFamilyOffset, getQualifierArray, getQualifierLength, getQualifierOffset, getRowArray, getRowLength, getRowOffset, getTimestamp, getValueArray, getValueLength, getValueOffset
Methods inherited from interface org.apache.hadoop.hbase.ExtendedCell
deepClone, getChunkId, getSequenceId, getSerializedSize, getSerializedSize, getType, getTypeByte, setSequenceId, setTimestamp, setTimestamp, write, write
Methods inherited from interface org.apache.hadoop.hbase.RawCell
cloneTags, getTag, getTags, getTagsArray, getTagsLength, getTagsOffset
-
Constructor Details
-
ByteBufferExtendedCell
public ByteBufferExtendedCell()
-
-
Method Details
-
getRowByteBuffer
Returns TheByteBuffer
containing the row bytes. -
getRowPosition
Returns Position in theByteBuffer
where row bytes start -
getFamilyByteBuffer
Returns TheByteBuffer
containing the column family bytes. -
getFamilyPosition
Returns Position in theByteBuffer
where column family bytes start -
getQualifierByteBuffer
Returns TheByteBuffer
containing the column qualifier bytes. -
getQualifierPosition
Returns Position in theByteBuffer
where column qualifier bytes start -
getValueByteBuffer
Returns TheByteBuffer
containing the value bytes. -
getValuePosition
Returns Position in theByteBuffer
where value bytes start -
getTagsByteBuffer
Returns TheByteBuffer
containing the tag bytes. -
getTagsPosition
Returns Position in theByteBuffer
where tag bytes start
-