This topic describes how to use HBase Shell to access an ApsaraDB for HBase Standard Edition instance.

Prerequisites

  • If you connect to an ApsaraDB for HBase Standard Edition instance over an internal network, make sure that an Elastic Compute Service (ECS) instance is purchased. This ECS instance must be deployed in the same virtual private cloud (VPC) as the ApsaraDB for HBase Standard Edition instance. Make sure that the IP address of the ECS instance is in the whitelist of the ApsaraDB for HBase Standard Edition instance.
    • For more information about how to purchase an ECS instance, see Create an ECS instance.
    • For more information about how to configure an IP address whitelist for an ApsaraDB for HBase Standard Edition instance, see Configure a whitelist.
  • If you connect to an ApsaraDB for HBase Standard Edition instance over the Internet, make sure that you have added the IP address of the server to run shell to the whitelist of the instance. For information about how to configure a whitelist for an ApsaraDB for HBase Standard Edition instance, see Configure a whitelist.

Procedure

  1. Download the HBase Shell package.
    1. Log on to the ApsaraDB for HBase console.
    2. On the Clusters page, find the instance that you want to manage and click the instance ID.
      Instances
    3. Click Database Connection.
      Download HBase Shell
    4. On the Database Connection page, click HBase Shell download to download the HBase Shell package.
  2. Configure the ZooKeeper addresses of the instance.
    1. Obtain the ZooKeeper addresses. On the Database Connection page of the instance, copy the ZooKeeper addresses of the instance.
      Add the ZooKeeper addresses
    2. Decompress the downloaded HBase Shell package, and add the ZooKeeper addresses of the instance to the hbase-site.xml file.
      
      <configuration> 
           <property>
               <name>hbase.zookeeper.quorum</name>
               <value>$ZK_IP1,$ZK_IP2,$ZK_IP3</value>
           </property> 
      </configuration>
                                      
  3. Run the bin/hbase shell command to access the instance.

What to do next

If you use HBase Shell to connect to an ApsaraDB for HBase Standard Edition instance, you can perform all operations on the instance, such as DML operations, read and write operations, table creation operations, and database O&M operations.

References

HBase Shell commands and examples.