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_CHUNKFields inherited from interface org.apache.hadoop.hbase.RawCell
MAX_TAGS_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ByteBufferReturns TheByteBuffercontaining the column family bytes.abstract intReturns Position in theByteBufferwhere column family bytes startabstract ByteBufferReturns TheByteBuffercontaining the column qualifier bytes.abstract intReturns Position in theByteBufferwhere column qualifier bytes startabstract ByteBufferReturns TheByteBuffercontaining the row bytes.abstract intReturns Position in theByteBufferwhere row bytes startabstract ByteBufferReturns TheByteBuffercontaining the tag bytes.abstract intReturns Position in theByteBufferwhere tag bytes startabstract ByteBufferReturns TheByteBuffercontaining the value bytes.abstract intReturns Position in theByteBufferwhere value bytes startMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.Cell
getFamilyArray, getFamilyLength, getFamilyOffset, getQualifierArray, getQualifierLength, getQualifierOffset, getRowArray, getRowLength, getRowOffset, getTimestamp, getType, getValueArray, getValueLength, getValueOffsetMethods inherited from interface org.apache.hadoop.hbase.ExtendedCell
deepClone, getChunkId, getSequenceId, getSerializedSize, getSerializedSize, getTagsArray, getTagsLength, getTagsOffset, getTypeByte, setSequenceId, setTimestamp, setTimestamp, write, write
-
Constructor Details
-
ByteBufferExtendedCell
public ByteBufferExtendedCell()
-
-
Method Details
-
getRowByteBuffer
Returns TheByteBuffercontaining the row bytes. -
getRowPosition
Returns Position in theByteBufferwhere row bytes start -
getFamilyByteBuffer
Returns TheByteBuffercontaining the column family bytes. -
getFamilyPosition
Returns Position in theByteBufferwhere column family bytes start -
getQualifierByteBuffer
Returns TheByteBuffercontaining the column qualifier bytes. -
getQualifierPosition
Returns Position in theByteBufferwhere column qualifier bytes start -
getValueByteBuffer
Returns TheByteBuffercontaining the value bytes. -
getValuePosition
Returns Position in theByteBufferwhere value bytes start -
getTagsByteBuffer
Returns TheByteBuffercontaining the tag bytes. -
getTagsPosition
Returns Position in theByteBufferwhere tag bytes start
-