Access data in ApsaraDB for HBase Performance-enhanced Edition

更新时间:
复制 MD 格式

Use Lindorm Distributed Processing System (LDPS) to access data stored in an ApsaraDB for HBase Performance-enhanced Edition cluster.

Prerequisites

Before you begin, ensure that you have:

Access HBase data through LDPS

  1. Connect to LindormTable using Lindorm-cli. For more information, see Use Lindorm-cli to connect to and use LindormTable.

  2. Use Lindorm SQL to map the qualifiers in your HBase table to fields in a Lindorm wide table. For more information, see Use SQL statements to access an HBase table.

  3. Access the HBase table through LDPS the same way you access a Lindorm wide table. For more information, see Access data in wide tables.

Convert BINARY row key data

When the primary key field ROW in an HBase table is mapped to a BINARY field in a Lindorm wide table, use the following built-in functions to convert the BINARY byte array to a specific data type.

For information about the data types supported by ApsaraDB for HBase Performance-enhanced Edition, see Use SQL statements to access an HBase table.

FunctionReturn typeParameters
to_hstring(bin, offset, length)STRINGbin: the byte array to convert. offset: the starting byte position; integer >= 0. length: the number of bytes to convert; integer > 0.
to_hboolean(bin, offset)BOOLEANbin: the byte array to convert. offset: the starting byte position; integer > 0.
to_hshort(bin, offset)SHORTbin: the byte array to convert. offset: the starting byte position.
to_hinteger(bin, offset)INTEGERbin: the byte array to convert. offset: the starting byte position.
to_hlong(bin, offset)LONGbin: the byte array to convert. offset: the starting byte position.
to_hfloat(bin, offset)FLOATbin: the byte array to convert. offset: the starting byte position.
to_hdouble(bin, offset)DOUBLEbin: the byte array to convert. offset: the starting byte position.