Advanced
Тема интерфейса

Connecting to a Common HBase Cluster Using HBase Shell

You can use the HBase shell to access a cluster by manually installing a client on an ECS. If a secure channel is enabled for the cluster, connect to the cluster by referring to connecting to an HBase cluster in security mode.

Manually Installing a Client

  1. Prepare a Linux ECS.

    For details, see the following content in Preparing an ECS.

  2. Download the client and verification file.

    Log in to the CloudTable management console. In the navigation pane on the left, choose Help. On the right of the page, click Download Client and Client Verification File to download the client installation package and client verification file.

  3. Install the client and verify the client.

    1. Use a file transfer tool (such as WinSCP) to upload the client installation package to the Linux ECS.
    2. Use the SSH login tool (such as PuTTY) to log in to the Linux ECS through the EIP.

      For details about how to log in to the Linux ECS, see "ECSs > Logging In to a Linux ECS > Login Using an SSH Password" in the Elastic Cloud Server User Guide.

      Run the following command to decompress the client installation package:

      cd <Path of the client installation package>
      tar xzvf hbase-1.3.1-bin.tar.gz
      cd <Path of the client installation package>
      tar xzvf hbase-2.4.14-bin.tar.gz

      <Path of the client installation package>: Replace it with the actual path.

    3. Decompress the client verification file to the same directory as the client.
      1. Decompress the client verification file.
        cd <Path for storing the client verification file >
        tar xzvf Client_sha256.tar.gz
      2. Obtain the client verification code.
        sha256sum HBase_Client_2.4.14.tar.gz
      3. Check the verification code in the client verification file and compare it with the client verification code. A match indicates no tampering, while a mismatch suggests tampering.
        less HBase_Client_2.4.14.tar.gz.sha256
    4. Configure the ZooKeeper address in a configuration file.

      In the decompression directory of the client installation package, open the hbase/conf/hbase-site.xml file and set the following parameters:

      • hbase.zookeeper.quorum: The value of this parameter is the access address (Intranet) of the cluster found in the cluster list.

        Log in to the CloudTable console and choose Cluster Management. In the cluster list, locate the required cluster and obtain the address in the Access Address (Intranet) column. See the following figure.

        Figure 1 ZK link


      • mapreduce.cluster.local.dir: Check whether the configuration item exists. If the configuration item does not exist, add it.

      The following is an example of configuring the client for a cluster with secure channel encryption disabled:

      <configuration>
      <property>
      <name>hbase.zookeeper.quorum</name>
      <value>xxx-zk1.cloudtable.com:2181,xxx-zk2.cloudtable.com:2181,xxx-zk3.cloudtable.com:2181</value>
      </property>
      <property>
      <name>mapreduce.cluster.local.dir</name>
      <value>${hadoop.tmp.dir}/mapred/local</value>
      </property>
      </configuration>

      For details about how to configure the cluster client with secure channel encryption enabled, see Connecting to a Secure HBase Cluster Using HBase Shell.

  4. Start the shell to access the cluster.

    Run the bin/hbase shell command to start the shell to access the cluster.