This topic describes how to connect to an ApsaraDB for HBase Standard Edition cluster using the HBase Shell.
Prerequisites
If you connect to the cluster over an internal network, ensure you have an ECS instance in the same VPC as your ApsaraDB for HBase Standard Edition cluster. You must also add the IP address of the ECS instance to the cluster's whitelist.
If you do not have an ECS instance, see Create an ECS instance.
If you have not configured a whitelist, see Configure a whitelist.
If you connect to the cluster over the internet, ensure the public IP address of the client where you run HBase Shell is added to the cluster's whitelist. If you have not configured a whitelist, see Configure a whitelist.
Usage
We strongly recommend using a Linux or macOS environment to connect to and use the wide-column engine with HBase Shell. If you use a Windows environment, you may encounter errors or issues with missing libraries. In such cases, you must add the required libraries to your system based on the error messages.
Procedure
Download the HBase Shell package.
Log on to the ApsaraDB for HBase console.
On the Clusters page, click the target cluster ID.
In the left-side navigation pane, click Database Connection.
In the Connection Information section, click HBase Shell download.
Configure the ZooKeeper addresses for the cluster.
Obtain the ZooKeeper addresses: In the Connection Information section, copy the cluster's ZooKeeper addresses.
Decompress the downloaded HBase Shell package and modify the hbase-site.xml file to add the ZooKeeper addresses.
<configuration> <property> <name>hbase.zookeeper.quorum</name> <value>$ZK_IP1,$ZK_IP2,$ZK_IP3</value> </property> </configuration>
Run the
bin/hbase shellcommand to connect to the cluster.
Next steps
After you connect to the ApsaraDB for HBase Standard Edition cluster, you can perform various operations, such as creating tables, running Data Manipulation Language (DML) commands, and performing administrative tasks.
References
HBase Shell: Command list and Command exercises.