Package org.apache.hadoop.hbase.types
Class OrderedBlob
java.lang.Object
org.apache.hadoop.hbase.types.OrderedBytesBase<byte[]>
org.apache.hadoop.hbase.types.OrderedBlob
- All Implemented Interfaces:
DataType<byte[]>
A
byte[] of variable-length. Build on
OrderedBytes.encodeBlobCopy(PositionedByteRange, byte[], int, int, Order).-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final OrderedBlobDeprecated.since 3.0.0 and will be removed in 4.0.0static final OrderedBlobDeprecated.since 3.0.0 and will b removed in 4.0.0Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Read an instance ofTfrom the buffersrc.intencode(PositionedByteRange dst, byte[] val) Write instancevalinto bufferdst.intencode(PositionedByteRange dst, byte[] val, int voff, int vlen) Write a subset ofvaltodst.Class<byte[]>Inform consumers over what type thisDataTypeoperates.intencodedLength(byte[] val) Inform consumers how long the encodedbyte[]will be.booleanIndicates whether this instance is able to skip over it's encoded value.Methods inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
getOrder, isNullable, isOrderPreserving, skip
-
Field Details
-
ASCENDING
Deprecated.since 3.0.0 and will be removed in 4.0.0 -
DESCENDING
Deprecated.since 3.0.0 and will b removed in 4.0.0
-
-
Constructor Details
-
OrderedBlob
Creates a newbyte[]with variable length.- Parameters:
order- theOrderto use
-
-
Method Details
-
isSkippable
Description copied from interface:DataTypeIndicates whether this instance is able to skip over it's encoded value.DataTypes that are not skippable can only be used as the right-most field of aStruct.- Specified by:
isSkippablein interfaceDataType<byte[]>- Overrides:
isSkippablein classOrderedBytesBase<byte[]>
-
encodedLength
Description copied from interface:DataTypeInform consumers how long the encodedbyte[]will be.- Parameters:
val- The value to check.- Returns:
- the number of bytes required to encode
val.a
-
encodedClass
Description copied from interface:DataTypeInform consumers over what type thisDataTypeoperates. Useful when working with bareDataTypeinstances. -
decode
Description copied from interface:DataTypeRead an instance ofTfrom the buffersrc.- Parameters:
src- the buffer containing the encoded value.
-
encode
Description copied from interface:DataTypeWrite instancevalinto bufferdst.- Parameters:
dst- the buffer containing the encoded value.val- the value to encode ontodst.- Returns:
- number of bytes written.
-
encode
Write a subset ofvaltodst.- Parameters:
dst- thePositionedByteRangeto write toval- the value to write todstvoff- the offset indstwhere to writevaltovlen- the lenght ofval- Returns:
- the number of bytes written
-