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>DataTypeis the base class for all HBase data types.org.apache.hadoop.hbase.types.FixedLengthWrapper<T>Wraps an existingDataTypeimplementation as a fixed-length version of itself.org.apache.hadoop.hbase.types.OrderedBlobAbyte[]of variable-length.org.apache.hadoop.hbase.types.OrderedBlobVarAn alternative toOrderedBlobfor use byStructfields that do not terminate the fields list.org.apache.hadoop.hbase.types.OrderedBytesBase<T>Base class for data types backed by theOrderedBytesencoding implementations.org.apache.hadoop.hbase.types.OrderedFloat32Afloatof 32-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedFloat64Adoubleof 64-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt16Ashortof 16-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt32Anintof 32-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt64Alongof 64-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedInt8Abyteof 8-bits using a fixed-length encoding.org.apache.hadoop.hbase.types.OrderedNumericAnNumberof arbitrary precision and variable-length encoding.org.apache.hadoop.hbase.types.OrderedStringAStringof variable-length.org.apache.hadoop.hbase.types.PBCellAn example for using protobuf objects withDataTypeAPI.org.apache.hadoop.hbase.types.PBType<T extends org.apache.hbase.thirdparty.com.google.protobuf.Message>A base-class forDataTypeimplementations backed by protobuf.org.apache.hadoop.hbase.types.RawByteAnDataTypefor interacting with values encoded usingBytes.putByte(byte[], int, byte).org.apache.hadoop.hbase.types.RawBytesAnDataTypefor interacting with variable-length values encoded usingBytes.putBytes(byte[], int, byte[], int, int).org.apache.hadoop.hbase.types.RawBytesFixedLengthAnDataTypethat encodes fixed-length values encoded usingBytes.putBytes(byte[], int, byte[], int, int).org.apache.hadoop.hbase.types.RawBytesTerminatedAnDataTypethat encodes variable-length values encoded usingBytes.putBytes(byte[], int, byte[], int, int).org.apache.hadoop.hbase.types.RawDoubleAnDataTypefor interacting with values encoded usingBytes.putDouble(byte[], int, double).org.apache.hadoop.hbase.types.RawFloatAnDataTypefor interacting with values encoded usingBytes.putFloat(byte[], int, float).org.apache.hadoop.hbase.types.RawIntegerAnDataTypefor interacting with values encoded usingBytes.putInt(byte[], int, int).org.apache.hadoop.hbase.types.RawLongAnDataTypefor interacting with values encoded usingBytes.putLong(byte[], int, long).org.apache.hadoop.hbase.types.RawShortAnDataTypefor interacting with values encoded usingBytes.putShort(byte[], int, short).org.apache.hadoop.hbase.types.RawStringAnDataTypefor interacting with values encoded usingBytes.toBytes(String).org.apache.hadoop.hbase.types.RawStringFixedLengthAnDataTypethat encodes fixed-length values encoded usingBytes.toBytes(String).org.apache.hadoop.hbase.types.RawStringTerminatedAnDataTypethat encodes variable-length values encoded usingBytes.toBytes(String).org.apache.hadoop.hbase.types.StructStructis a simpleDataTypefor implementing "compound rowkey" and "compound qualifier" schema design strategies.org.apache.hadoop.hbase.types.StructBuilderA helper for buildingStructinstances.org.apache.hadoop.hbase.types.StructIteratorAnIteratorover encodedStructmembers.org.apache.hadoop.hbase.types.TerminatedWrapper<T>Wraps an existingDataTypeimplementation as a terminated version of itself.org.apache.hadoop.hbase.types.Union2<A,B> TheUnionfamily ofDataTypes encode one of a fixed set ofObjects.org.apache.hadoop.hbase.types.Union3<A,B, C> TheUnionfamily ofDataTypes encode one of a fixed collection of Objects.org.apache.hadoop.hbase.types.Union4<A,B, C, D> TheUnionfamily ofDataTypes encode one of a fixed collection of Objects.