Nik
Nik

Reputation: 5725

Starbase connection to Hbase

I want to use starbase to connect to Hbase on a different machine. How should my HBase configuration look like?

On the remote machine, HBase is installed in /opt/somedir/hbase/. It has a conf folder which has the following files.

>> ls
hadoop-metrics.properties  hbase-env.sh      hbase-site.xml    regionservers
hbase-env.cmd              hbase-policy.xml  log4j.properties

hbase-site.xml does not have any port information except for zookeeper port, which I believe is not the remote server port for HBase.

From my client machine, I did the following.

>>python
Python 2.7.5+ (default, Sep 19 2013, 13:48:49) 
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from starbase import Connection
>>> c = Connection(host='hbase-machine-ip',port=60010)
>>> c.tables()
[]

I used port 60010 because the documentation said that this was the port for HBase-GUI.

I have the following questions.

  1. Is my HBase configured to accept remote connections? On what port? If not, how can I specify this setting?

  2. How do I specify the user/password information in connection? My client machine username is 'nik' whereas the HBase machine username is 'nik2'. My HBase tables are created in /user/nik2/tables. Please let me know how I should specify my connection.

  3. There are 3 tables in HBase, yet c.tables() shows an empty list. So either the connection is not correct, or I am not correctly specifying the path to tables. How should I do that?

Upvotes: 0

Views: 993

Answers (1)

Arnon Rotem-Gal-Oz
Arnon Rotem-Gal-Oz

Reputation: 25909

Starbase does not connect directly to HBase it connects to Stargate - HBase REST API (see the documentation page for starbase). You need to see that stargate is installed and running. The port you would use is the Starbase port

Upvotes: 1

Related Questions