Skip navigation links

Package org.apache.hadoop.hbase.types

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

See: Description

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
Skip navigation links

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