Package org.apache.hadoop.hbase.types
Class RawBytes
java.lang.Object
org.apache.hadoop.hbase.types.RawBytes
- All Implemented Interfaces:
- DataType<byte[]>
An 
DataType for interacting with variable-length values encoded using
 Bytes.putBytes(byte[], int, byte[], int, int). Intended to make it easier to transition
 away from direct use of Bytes.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbyte[]Read an instance ofTfrom the buffersrc.byte[]decode(PositionedByteRange src, int length) Read abyte[]from the buffersrc.intencode(PositionedByteRange dst, byte[] val) Write instancevalinto bufferdst.intencode(PositionedByteRange dst, byte[] val, int voff, int vlen) Writevalintodst, respectingvoffandvlen.Class<byte[]>Inform consumers over what type thisDataTypeoperates.intencodedLength(byte[] val) Inform consumers how long the encodedbyte[]will be.getOrder()Retrieve the sortOrderimposed by this data type, or null when natural ordering is not preserved.booleanIndicates whether this instance supports encoding null values.booleanIndicates whether this instance writes encodedbyte[]'s which preserve the natural sort order of the unencoded value.booleanIndicates whether this instance is able to skip over it's encoded value.intskip(PositionedByteRange src) Skipsrc's position forward over one encoded value.
- 
Field Details- 
ASCENDINGDeprecated.since 3.0.0 and will be removed in 4.0.0
- 
DESCENDINGDeprecated.since 3.0.0 and will be removed in 4.0.0
- 
order
 
- 
- 
Constructor Details
- 
Method Details- 
isOrderPreservingDescription copied from interface:DataTypeIndicates whether this instance writes encodedbyte[]'s which preserve the natural sort order of the unencoded value.- Specified by:
- isOrderPreservingin interface- DataType<byte[]>
- Returns:
- truewhen natural order is preserved,- falseotherwise.
 
- 
getOrderDescription copied from interface:DataTypeRetrieve the sortOrderimposed by this data type, or null when natural ordering is not preserved. Value is either ascending or descending. Default is assumed to beOrder.ASCENDING.
- 
isNullableDescription copied from interface:DataTypeIndicates whether this instance supports encoding null values. This depends on the implementation details of the encoding format. AllDataTypes that support null should treat null as comparing less than any non-null value for default sort ordering purposes.- Specified by:
- isNullablein interface- DataType<byte[]>
- Returns:
- truewhen null is supported,- falseotherwise.
 
- 
isSkippableDescription 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 interface- DataType<byte[]>
 
- 
skipDescription copied from interface:DataTypeSkipsrc's position forward over one encoded value.
- 
encodedLengthDescription copied from interface:DataTypeInform consumers how long the encodedbyte[]will be.- Specified by:
- encodedLengthin interface- DataType<byte[]>
- Parameters:
- val- The value to check.
- Returns:
- the number of bytes required to encode val.a
 
- 
encodedClassDescription copied from interface:DataTypeInform consumers over what type thisDataTypeoperates. Useful when working with bareDataTypeinstances.- Specified by:
- encodedClassin interface- DataType<byte[]>
 
- 
decodeDescription copied from interface:DataTypeRead an instance ofTfrom the buffersrc.
- 
encodeDescription copied from interface:DataTypeWrite instancevalinto bufferdst.
- 
decodeRead abyte[]from the buffersrc.- Parameters:
- src- the- PositionedByteRangeto read the- byte[]from
- length- the length to read from the buffer
- Returns:
- the byte[]read from the buffer
 
- 
encodeWritevalintodst, respectingvoffandvlen.- Parameters:
- dst- the- PositionedByteRangeto write to
- val- the value to write to- dst
- voff- the offset in- dstwhere to write- valto
- vlen- the length of- val
- Returns:
- number of bytes written
 
 
-