Promo Center

50% off for new user

Direct Mail-46% off

Learn More

Access data in ApsaraDB for HBase Performance-enhanced Edition

Updated at: 2023-08-11 07:35

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

Prerequisites

Procedure

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

  2. Use the Lindorm SQL to add mappings between the qualifiers in HBase tables and the fields in Lindorm wide tables. For more information, see Use SQL statements to access an HBase table.

  3. Use LDPS to access an HBase table in the similar way as you access a Lindorm wide table. For more information, see Access data in wide tables.

    If the primary key field ROW in HBase tables is mapped to a BINARY field in Lindorm wide tables, you can use the built-in functions described in the following table to convert BINARY data to data whose type is supported by HBase. For more information about the data types supported by ApsaraDB for HBase Performance-enhanced Edition, see Use SQL statements to access an HBase table.

    Function

    Description

    Parameter

    Function

    Description

    Parameter

    to_hstring(bin,offset,length)

    Converts a byte array to an HSTRING value. The returned value of this function is of the STRING type.

    • bin: the byte array that you want to convert.

    • offset: the position from which the byte array is converted. The value of this parameter must be an integer greater than or equal to 0.

    • length: the length of the byte array that you want to convert. The value of this parameter must be an integer greater than 0.

    to_hboolean(bin,offset)

    Converts a byte array to an HBOOLEAN value. The returned value of this function is of the BOOLEAN type.

    • bin: the byte array that you want to convert.

    • offset: the position from which the byte array is converted. The value of this parameter must be an integer greater than 0.

    to_hshort(bin,offset)

    Converts a byte array to an HSHORT value. The returned value of this function is of the SHORT type.

    to_hinteger(bin,offset)

    Converts a byte array to an HINTEGER value. The returned value of this function is of the INTEGER type.

    to_hlong(bin,offset)

    Converts a byte array to an HLONG value. The returned value of this function is of the LONG type.

    to_hfloat(bin,offset)

    Converts a byte array to an HFLOAT value. The returned value of this function is of the FLOAT type.

    to_hdouble(bin,offset)

    Converts a byte array to an HDOUBLE value. The returned value of this function is of the DOUBLE type.

  • On this page (1, T)
  • Prerequisites
  • Procedure
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare