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
FieldsModifier and TypeFieldDescriptionstatic final intprivate intprivate shortFields inherited from class org.apache.hadoop.hbase.ByteBufferKeyValue
buf, length, offsetFields 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
ConstructorsConstructorDescriptionSizeCachedByteBufferKeyValue(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 TypeMethodDescriptionbooleanNeeded doing 'contains' on List.intshortReturns Number of row bytes.intOverride by just returning the length for saving cost of method dispatching.inthashCode()In line withByteBufferKeyValue.equals(Object), only uses the key portion, not the value.longheapSize()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, writeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.ExtendedCell
getChunkId, getType
-
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:CellReturns Number of row bytes. Must be < rowArray.length - offset.- Specified by:
getRowLengthin interfaceCell- Overrides:
getRowLengthin classByteBufferKeyValue
-
getKeyLength
- Overrides:
getKeyLengthin classByteBufferKeyValue
-
heapSize
Description copied from interface:HeapSizeReturn the approximate 'exclusive deep size' of implementing object. Includes count of payload and hosting object sizings.- Specified by:
heapSizein interfaceHeapSize- Overrides:
heapSizein 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:
getSerializedSizein interfaceCell- Specified by:
getSerializedSizein interfaceExtendedCell- Overrides:
getSerializedSizein classByteBufferKeyValue
-
equals
Description copied from class:ByteBufferKeyValueNeeded doing 'contains' on List. Only compares the key portion, not the value.- Overrides:
equalsin classByteBufferKeyValue
-
hashCode
Description copied from class:ByteBufferKeyValueIn line withByteBufferKeyValue.equals(Object), only uses the key portion, not the value.- Overrides:
hashCodein classByteBufferKeyValue
-