Package org.apache.hadoop.hbase.types

This package provides the definition and implementation of HBase's extensible data type API.

See:
          Description

Interface Summary
DataType<T> DataType is the base class for all HBase data types.
 

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

Package org.apache.hadoop.hbase.types Description

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


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.