Updated on 2023-08-31 GMT+08:00

HBase Sample Project

To obtain an MRS sample project, visit https://github.com/huaweicloud/huaweicloud-mrs-example and switch to the branch that matches the MRS cluster version. Download the package to the local PC and decompress it to obtain the sample project of each component.

MRS provides the following HBase sample projects:
Table 1 HBase-related sample projects

Location

Description

hbase-examples/hbase-example

A development example for HBase data read and write operations

By calling HBase APIs, you can create user tables, import user data, add and query user information, and create secondary indexes for user tables. For details about related service scenarios, see Typical Scenario Description.

hbase-examples/hbase-rest-example

A development example for using HBase REST interfaces.

You can use REST APIs to query HBase cluster information, obtain tables, and perform operations on namespaces and tables. For details, see Calling REST Interfaces.

hbase-examples/hbase-thrift-example

A development example for accessing HBase ThriftServer.

You can learn how to access ThriftServer to operate tables, and how to write data to and read data from tables. For details, see Accessing HBase ThriftServer.

hbase-examples/hbase-zk-example

A development example for HBase to access ZooKeeper.

You can use the same client process to access MRS ZooKeeper and third-party ZooKeeper at the same time. The HBase client accesses MRS ZooKeeper, and the customer application accesses third-party ZooKeeper. For details, see Accessing Multiple ZooKeepers with HBase.