@InterfaceAudience.Private public abstract class ByteBufferExtendedCell extends Object implements ExtendedCell
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.
CELL_NOT_BASED_ON_CHUNK
MAX_TAGS_LENGTH
Constructor and Description |
---|
ByteBufferExtendedCell() |
Modifier and Type | Method and Description |
---|---|
abstract ByteBuffer |
getFamilyByteBuffer() |
abstract int |
getFamilyPosition() |
abstract ByteBuffer |
getQualifierByteBuffer() |
abstract int |
getQualifierPosition() |
abstract ByteBuffer |
getRowByteBuffer() |
abstract int |
getRowPosition() |
abstract ByteBuffer |
getTagsByteBuffer() |
abstract int |
getTagsPosition() |
abstract ByteBuffer |
getValueByteBuffer() |
abstract int |
getValuePosition() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deepClone, getChunkId, getSequenceId, getSerializedSize, getSerializedSize, getTagsArray, getTagsLength, getTagsOffset, getTypeByte, setSequenceId, setTimestamp, setTimestamp, write, write
checkForTagsLength, cloneTags, getTag, getTags
getFamilyArray, getFamilyLength, getFamilyOffset, getQualifierArray, getQualifierLength, getQualifierOffset, getRowArray, getRowLength, getRowOffset, getTimestamp, getType, getValueArray, getValueLength, getValueOffset
public abstract ByteBuffer getRowByteBuffer()
ByteBuffer
containing the row bytes.public abstract int getRowPosition()
ByteBuffer
where row bytes startpublic abstract ByteBuffer getFamilyByteBuffer()
ByteBuffer
containing the column family bytes.public abstract int getFamilyPosition()
ByteBuffer
where column family bytes startpublic abstract ByteBuffer getQualifierByteBuffer()
ByteBuffer
containing the column qualifier bytes.public abstract int getQualifierPosition()
ByteBuffer
where column qualifier bytes startpublic abstract ByteBuffer getValueByteBuffer()
ByteBuffer
containing the value bytes.public abstract int getValuePosition()
ByteBuffer
where value bytes startpublic abstract ByteBuffer getTagsByteBuffer()
ByteBuffer
containing the tag bytes.public abstract int getTagsPosition()
ByteBuffer
where tag bytes startCopyright © 2007–2019 Cloudera. All rights reserved.