Package org.apache.hadoop.hbase.types


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
  • Class
    Description
    org.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 existing DataType implementation as a fixed-length version of itself.
    org.apache.hadoop.hbase.types.OrderedBlob
    A byte[] of variable-length.
    org.apache.hadoop.hbase.types.OrderedBlobVar
    An alternative to OrderedBlob for use by Struct fields that do not terminate the fields list.
    org.apache.hadoop.hbase.types.OrderedBytesBase<T>
    Base class for data types backed by the OrderedBytes encoding implementations.
    org.apache.hadoop.hbase.types.OrderedFloat32
    A float of 32-bits using a fixed-length encoding.
    org.apache.hadoop.hbase.types.OrderedFloat64
    A double of 64-bits using a fixed-length encoding.
    org.apache.hadoop.hbase.types.OrderedInt16
    A short of 16-bits using a fixed-length encoding.
    org.apache.hadoop.hbase.types.OrderedInt32
    An int of 32-bits using a fixed-length encoding.
    org.apache.hadoop.hbase.types.OrderedInt64
    A long of 64-bits using a fixed-length encoding.
    org.apache.hadoop.hbase.types.OrderedInt8
    A byte of 8-bits using a fixed-length encoding.
    org.apache.hadoop.hbase.types.OrderedNumeric
    An Number of arbitrary precision and variable-length encoding.
    org.apache.hadoop.hbase.types.OrderedString
    A String of variable-length.
    org.apache.hadoop.hbase.types.PBCell
    An example for using protobuf objects with DataType 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.RawByte
    An DataType for interacting with values encoded using Bytes.putByte(byte[], int, byte).
    org.apache.hadoop.hbase.types.RawBytes
    An DataType for interacting with variable-length values encoded using Bytes.putBytes(byte[], int, byte[], int, int).
    org.apache.hadoop.hbase.types.RawBytesFixedLength
    An DataType that encodes fixed-length values encoded using Bytes.putBytes(byte[], int, byte[], int, int).
    org.apache.hadoop.hbase.types.RawBytesTerminated
    An DataType that encodes variable-length values encoded using Bytes.putBytes(byte[], int, byte[], int, int).
    org.apache.hadoop.hbase.types.RawDouble
    An DataType for interacting with values encoded using Bytes.putDouble(byte[], int, double).
    org.apache.hadoop.hbase.types.RawFloat
    An DataType for interacting with values encoded using Bytes.putFloat(byte[], int, float).
    org.apache.hadoop.hbase.types.RawInteger
    An DataType for interacting with values encoded using Bytes.putInt(byte[], int, int).
    org.apache.hadoop.hbase.types.RawLong
    An DataType for interacting with values encoded using Bytes.putLong(byte[], int, long).
    org.apache.hadoop.hbase.types.RawShort
    An DataType for interacting with values encoded using Bytes.putShort(byte[], int, short).
    org.apache.hadoop.hbase.types.RawString
    An DataType for interacting with values encoded using Bytes.toBytes(String).
    org.apache.hadoop.hbase.types.RawStringFixedLength
    An DataType that encodes fixed-length values encoded using Bytes.toBytes(String).
    org.apache.hadoop.hbase.types.RawStringTerminated
    An DataType that encodes variable-length values encoded using Bytes.toBytes(String).
    org.apache.hadoop.hbase.types.Struct
    Struct is a simple DataType for implementing "compound rowkey" and "compound qualifier" schema design strategies.
    org.apache.hadoop.hbase.types.StructBuilder
    A helper for building Struct instances.
    org.apache.hadoop.hbase.types.StructIterator
    An Iterator over encoded Struct members.
    org.apache.hadoop.hbase.types.TerminatedWrapper<T>
    Wraps an existing DataType implementation as a terminated version of itself.
    org.apache.hadoop.hbase.types.Union2<A,B>
    The Union family of DataTypes encode one of a fixed set of Objects.
    org.apache.hadoop.hbase.types.Union3<A,B,C>
    The Union family of DataTypes encode one of a fixed collection of Objects.
    org.apache.hadoop.hbase.types.Union4<A,B,C,D>
    The Union family of DataTypes encode one of a fixed collection of Objects.