Connect to an ApsaraDB for HBase Standard Edition cluster from the command line using HBase Shell. This guide walks you through downloading the HBase Shell package, configuring ZooKeeper addresses, and opening an interactive shell session.
Prerequisites
Before you begin, ensure that you have:
An ApsaraDB for HBase Standard Edition cluster
An Elastic Compute Service (ECS) instance in the same region as the cluster (ApsaraDB for HBase clusters are accessed over an internal network)
Java 8 installed on the ECS instance
HBase Shell does not support Java 11. Use Java 8.
If you do not have an ECS instance, purchase a pay-as-you-go ECS instance in the same region as your cluster before proceeding.
Connect to a cluster using HBase Shell
Download the HBase Shell package. Log on to the ApsaraDB for HBase console, find your cluster, and click the cluster ID. In the left-side navigation pane, click Database Connection. In the Connection Information section, click HBase Shell download.
Decompress the package.
tar -zxf xxx.tar.gzConfigure the ZooKeeper addresses. Open
conf/hbase-site.xmland add the following configuration. Replace$ZK_IP1,$ZK_IP2,$ZK_IP3with the ZooKeeper addresses listed on the Database Connection page.<configuration> <property> <name>hbase.zookeeper.quorum</name> <!-- Comma-separated list of ZooKeeper node addresses for the cluster --> <value>$ZK_IP1,$ZK_IP2,$ZK_IP3</value> </property> </configuration>Start HBase Shell.
bin/hbase shell