How to run HBase shell against a remote cluster
Asked Answered
R

3

10

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.

Riella answered 18/4, 2012 at 23:16 Comment(5)
Not sure, but I think making changes to the following conf files might do the job. 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.Plourde
@Plourde you should make that an answer (particularly since it is the correct one)Haugen
Good idea! Although I'd prefer something like the -conf param, I can just pop in and change the actual config files. Would I need to re-start the services after updating the configs?Riella
No, no re-starts should be needed.Plourde
@Riella no- you need to change them on the client machine only (where you run hbase shell)Haugen
P
6

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.

Plourde answered 19/4, 2012 at 0:48 Comment(0)
V
7

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>
Vision answered 21/6, 2017 at 15:22 Comment(0)
P
6

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.

Plourde answered 19/4, 2012 at 0:48 Comment(0)
D
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>
Dave answered 16/12, 2015 at 3:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.