You can use Lindorm Distributed Processing System (LDPS) to access data stored in an ApsaraDB for HBase Performance-enhanced Edition cluster.
Prerequisites
LDPS is activated for your Lindorm instance. For more information, see Activate LDPS and modify the configurations.
You have read and understood the precautions for accessing data by using LDPS. For more information, see Precautions.
Operations related to your jobs are completed. For more information about the operations that you need to complete in different jobs, see the following topics:
JDBC jobs: Use JDBC in application development
JAR jobs: Create a job in Java
Python jobs: Create a job in Python
Procedure
Use Lindorm-cli to connect to LindormTable. For more information, see Use Lindorm-cli to connect to and use LindormTable.
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.
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.