How to run HBase shell against a remote cluster

16,199

Solution 1

Make changes to the following conf files.

  • For hadoop: core-site.xml, mapred-site.xml.
  • For hbase: hbase-site.xml.

You could create multiple versions of these files and switch between them as needed.

Solution 2

I'm using following command:

hbase --config "path to folder with config files" shell

Folder with configuration should contain at least hbase-site.xml with content:

<configuration>
  <property>
   <name>hbase.cluster.distributed</name>
   <value>true</value>
 </property>
  <property>
    <name>hbase.zookeeper.quorum</name>
 <value>zk1,zk2,zk3</value>
  </property>
   <property>
        <name>zookeeper.znode.parent</name>
<!--or /hbase-->
        <value>/hbase-unsecure</value>
    </property>
</configuration>

Solution 3

change hbase-site.xml add zookeeper host port with hbase server.

<configuration>
<property>
  <name>hbase.zookeeper.quorum</name>
  <value>zk.hostname</value>
</property>
</configuration>
Share:
16,199
sangfroid
Author by

sangfroid

Updated on July 19, 2022

Comments

  • sangfroid
    sangfroid almost 2 years

    I'm running HBase in pseudo-distributed mode on my workstation. We also have HBase running on a cluster. Using the HBase shell, I'd like to access the HBase instance that's running on the cluster from my workstation. I would like to do this without logging into one of the cluster machines.

    With Hadoop, you can run jobs on a remote cluster by specifying the -conf parameter and supplying an alternate version of hadoop-site.xml. Is there an equivalent for the HBase shell?

    I'm running cloudera cdh3u3 on my workstation and on the cluster machines.