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
Modifier and TypeFieldDescriptionstatic final OrderedBlob
Deprecated.since 3.0.0 and will be removed in 4.0.0static final OrderedBlob
Deprecated.since 3.0.0 and will b removed in 4.0.0Fields inherited from class org.apache.hadoop.hbase.types.OrderedBytesBase
order
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Read an instance ofT
from the buffersrc
.int
encode
(PositionedByteRange dst, byte[] val) Write instanceval
into bufferdst
.int
encode
(PositionedByteRange dst, byte[] val, int voff, int vlen) Write a subset ofval
todst
.Class<byte[]>
Inform consumers over what type thisDataType
operates.int
encodedLength
(byte[] val) Inform consumers how long the encodedbyte[]
will be.boolean
Indicates 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
- theOrder
to use
-
-
Method Details
-
isSkippable
Description copied from interface:DataType
Indicates whether this instance is able to skip over it's encoded value.DataType
s that are not skippable can only be used as the right-most field of aStruct
.- Specified by:
isSkippable
in interfaceDataType<byte[]>
- Overrides:
isSkippable
in classOrderedBytesBase<byte[]>
-
encodedLength
Description copied from interface:DataType
Inform 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:DataType
Inform consumers over what type thisDataType
operates. Useful when working with bareDataType
instances. -
decode
Description copied from interface:DataType
Read an instance ofT
from the buffersrc
.- Parameters:
src
- the buffer containing the encoded value.
-
encode
Description copied from interface:DataType
Write instanceval
into bufferdst
.- Parameters:
dst
- the buffer containing the encoded value.val
- the value to encode ontodst
.- Returns:
- number of bytes written.
-
encode
Write a subset ofval
todst
.- Parameters:
dst
- thePositionedByteRange
to write toval
- the value to write todst
voff
- the offset indst
where to writeval
tovlen
- the lenght ofval
- Returns:
- the number of bytes written
-