Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run HBase shell against a remote cluster

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.

like image 242
sangfroid Avatar asked Apr 18 '12 23:04

sangfroid


3 Answers

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.

like image 167
mohit6up Avatar answered Sep 20 '22 10:09

mohit6up


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

<configuration>
<property>
  <name>hbase.zookeeper.quorum</name>
  <value>zk.hostname</value>
</property>
</configuration>
like image 30
Lighting Cui Avatar answered Sep 20 '22 10:09

Lighting Cui


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>
like image 27
Viktor Avatar answered Sep 19 '22 10:09

Viktor