Package org.apache.hadoop.hbase
Class SizeCachedByteBufferKeyValue
java.lang.Object
org.apache.hadoop.hbase.ByteBufferExtendedCell
org.apache.hadoop.hbase.ByteBufferKeyValue
org.apache.hadoop.hbase.SizeCachedByteBufferKeyValue
- All Implemented Interfaces:
Cell
,ExtendedCell
,HeapSize
,RawCell
This Cell is an implementation of
ByteBufferExtendedCell
where the data resides in off
heap/ on heap ByteBuffer-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
private int
private short
Fields inherited from class org.apache.hadoop.hbase.ByteBufferKeyValue
buf, length, offset
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
ConstructorDescriptionSizeCachedByteBufferKeyValue
(ByteBuffer buf, int offset, int length, long seqId, int keyLen) SizeCachedByteBufferKeyValue
(ByteBuffer buf, int offset, int length, long seqId, int keyLen, short rowLen) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Needed doing 'contains' on List.int
short
Returns Number of row bytes.int
Override by just returning the length for saving cost of method dispatching.int
hashCode()
In line withByteBufferKeyValue.equals(Object)
, only uses the key portion, not the value.long
heapSize()
Return the approximate 'exclusive deep size' of implementing object.Methods inherited from class org.apache.hadoop.hbase.ByteBufferKeyValue
deepClone, getBuffer, getFamilyArray, getFamilyByteBuffer, getFamilyLength, getFamilyLength, getFamilyLengthPosition, getFamilyLengthPosition, getFamilyOffset, getFamilyPosition, getFamilyPosition, getOffset, getQualifierArray, getQualifierByteBuffer, getQualifierLength, getQualifierLength, getQualifierOffset, getQualifierPosition, getQualifierPosition, getRowArray, getRowByteBuffer, getRowOffset, getRowPosition, getSequenceId, getSerializedSize, getTagsArray, getTagsByteBuffer, getTagsLength, getTagsOffset, getTagsPosition, getTimestamp, getTimestamp, getTypeByte, getTypeByte, getValueArray, getValueByteBuffer, getValueLength, getValueOffset, getValuePosition, setSequenceId, setTimestamp, setTimestamp, toString, write, write
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.ExtendedCell
getChunkId
-
Field Details
-
FIXED_OVERHEAD
- See Also:
-
rowLen
-
keyLen
-
-
Constructor Details
-
SizeCachedByteBufferKeyValue
-
SizeCachedByteBufferKeyValue
public SizeCachedByteBufferKeyValue(ByteBuffer buf, int offset, int length, long seqId, int keyLen, short rowLen)
-
-
Method Details
-
getRowLength
Description copied from interface:Cell
Returns Number of row bytes. Must be < rowArray.length - offset.- Specified by:
getRowLength
in interfaceCell
- Overrides:
getRowLength
in classByteBufferKeyValue
-
getKeyLength
- Overrides:
getKeyLength
in classByteBufferKeyValue
-
heapSize
Description copied from interface:HeapSize
Return the approximate 'exclusive deep size' of implementing object. Includes count of payload and hosting object sizings.- Specified by:
heapSize
in interfaceHeapSize
- Overrides:
heapSize
in classByteBufferKeyValue
-
getSerializedSize
Override by just returning the length for saving cost of method dispatching. If not, it will callExtendedCell.getSerializedSize()
firstly, then forward toKeyValue.getSerializedSize(boolean)
. (See HBASE-21657)- Specified by:
getSerializedSize
in interfaceCell
- Specified by:
getSerializedSize
in interfaceExtendedCell
- Overrides:
getSerializedSize
in classByteBufferKeyValue
-
equals
Description copied from class:ByteBufferKeyValue
Needed doing 'contains' on List. Only compares the key portion, not the value.- Overrides:
equals
in classByteBufferKeyValue
-
hashCode
Description copied from class:ByteBufferKeyValue
In line withByteBufferKeyValue.equals(Object)
, only uses the key portion, not the value.- Overrides:
hashCode
in classByteBufferKeyValue
-