Package org.apache.hadoop.hbase.types
This package provides the definition and implementation of HBase's
extensible data type API. DataType
is the entry point. Basic type implementations are provided based on two
different encoding schemes: the Raw*
implementations use the
toXXX
methods in Bytes
and
the Ordered*
implementations use the encoding scheme defined in
OrderedBytes
. Complex types are also
supported in the form of Struct
and
the abstract Union
classes.
DataType
implementations are used to
convert a POJO into a byte[]
while maintaining application-level
constraints over the values produces and consumed. They also provide hints
to consumers about the nature of encoded values as well as the relationship
between different instances. See the class comments on
DataType
for details.
The DataType
interface is primarily
of use for creating rowkeys and column qualifiers. It can also be used as a
an encoder for primitive values. It does not support concerns of complex
object serialization, concepts like schema version and migration. These
concepts are handled more thoroughly by tools like Thrift, Avro, and
Protobuf.
- Since:
- 0.95.2
-
ClassDescriptionorg.apache.hadoop.hbase.types.CopyOnWriteArrayMap<K,
V> A Map that keeps a sorted array in order to provide the concurrent map interface.org.apache.hadoop.hbase.types.DataType<T>DataType
is the base class for all HBase data types.org.apache.hadoop.hbase.types.FixedLengthWrapper<T>Wraps an existingDataType
implementation as a fixed-length version of itself.org.apache.hadoop.hbase.types.OrderedBlobAbyte[]
of variable-length.org.apache.hadoop.hbase.types.OrderedBlobVarAn alternative toOrderedBlob
for use byStruct
fields that do not terminate the fields list.org.apache.hadoop.hbase.types.OrderedBytesBase<T>Base class for data types backed by theOrderedBytes
encoding implementations.org.apache.hadoop.hbase.types.OrderedFloat32Afloat
of 32-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedFloat64Adouble
of 64-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt16Ashort
of 16-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt32Anint
of 32-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt64Along
of 64-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt8Abyte
of 8-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedNumericAnNumber
of arbitrary precision and variable-length encoding.org.apache.hadoop.hbase.types.OrderedStringAString
of variable-length.org.apache.hadoop.hbase.types.PBCellAn example for using protobuf objects withDataType
API.org.apache.hadoop.hbase.types.PBType<T extends com.google.protobuf.Message>Deprecated.Will be removed in 3.0.0 without replacement.org.apache.hadoop.hbase.types.RawByteAnDataType
for interacting with values encoded usingBytes.putByte(byte[], int, byte)
.org.apache.hadoop.hbase.types.RawBytesAnDataType
for interacting with variable-length values encoded usingBytes.putBytes(byte[], int, byte[], int, int)
.org.apache.hadoop.hbase.types.RawBytesFixedLengthAnDataType
that encodes fixed-length values encoded usingBytes.putBytes(byte[], int, byte[], int, int)
.org.apache.hadoop.hbase.types.RawBytesTerminatedAnDataType
that encodes variable-length values encoded usingBytes.putBytes(byte[], int, byte[], int, int)
.org.apache.hadoop.hbase.types.RawDoubleAnDataType
for interacting with values encoded usingBytes.putDouble(byte[], int, double)
.org.apache.hadoop.hbase.types.RawFloatAnDataType
for interacting with values encoded usingBytes.putFloat(byte[], int, float)
.org.apache.hadoop.hbase.types.RawIntegerAnDataType
for interacting with values encoded usingBytes.putInt(byte[], int, int)
.org.apache.hadoop.hbase.types.RawLongAnDataType
for interacting with values encoded usingBytes.putLong(byte[], int, long)
.org.apache.hadoop.hbase.types.RawShortAnDataType
for interacting with values encoded usingBytes.putShort(byte[], int, short)
.org.apache.hadoop.hbase.types.RawStringAnDataType
for interacting with values encoded usingBytes.toBytes(String)
.org.apache.hadoop.hbase.types.RawStringFixedLengthAnDataType
that encodes fixed-length values encoded usingBytes.toBytes(String)
.org.apache.hadoop.hbase.types.RawStringTerminatedAnDataType
that encodes variable-length values encoded usingBytes.toBytes(String)
.org.apache.hadoop.hbase.types.StructStruct
is a simpleDataType
for implementing "compound rowkey" and "compound qualifier" schema design strategies.org.apache.hadoop.hbase.types.StructBuilderA helper for buildingStruct
instances.org.apache.hadoop.hbase.types.StructIteratorAnIterator
over encodedStruct
members.org.apache.hadoop.hbase.types.TerminatedWrapper<T>Wraps an existingDataType
implementation as a terminated version of itself.org.apache.hadoop.hbase.types.Union2<A,B> TheUnion
family ofDataType
s encode one of a fixed set ofObject
s.org.apache.hadoop.hbase.types.Union3<A,B, C> TheUnion
family ofDataType
s encode one of a fixed collection of Objects.org.apache.hadoop.hbase.types.Union4<A,B, C, D> TheUnion
family ofDataType
s encode one of a fixed collection of Objects.