You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Bob Schulze <b....@ecircle.com> on 2009/10/08 12:42:10 UTC

Re: HBase client query / required configs for a hbase client

Hi,

	thx for the answers in this thread, but is there anywhere a description
on how to connect from a client? I mean, before (0.20) it was enough to
instantiate HTable/HBaseAdmin by just setting the master address in the
configuration (as in Keith' example). Now it seems to expect a lot more
(like stuff from zoo.cfg)...but what exactly is needed?

I certainly dont want to have _all_ configs from the server instance
around....

Thx again for any pointers,

	Bob

Keith Thomas schrieb:
> Hi, 
> 
> I am trying to move my HBase client application from,
> 
> - a Ubuntu Virtual Machine running HBase in pseudo distributed mode with
> default configuration settings, to,
> - the OS X machine hosting the Ubuntu Virtual Machine running HBase
> 
> Based upon other Nabble threads I have inserted a set() line into my code,
> 
> 		        this.hbConfig = new HBaseConfiguration();
> 		        this.hbConfig.set("hbase.master", "192.168.1.19:60000"); // New
> code added
> 		        this.hbAdmin = new HBaseAdmin(this.hbConfig);
> 
> but I see the following exception thrown when executing the 'new
> HBaseAdmin(...)' statement,
> 
> org.apache.hadoop.hbase.MasterNotRunningException
> 	at
> org.apache.hadoop.hbase.client.HConnectionManager$TableServers.getMaster(HConnectionManager.java:347)
> 
> I am suspicious I have not configured my client correctly as I cannot find
> an "hbase.master" property in my HBase XML config files. Apologies if there
> are some docs I should have read, if this is the case please just point me
> at the appropriate docs.
> 
> 
> 
> 
> 


-- 

	Bob Schulze
	Head Software Development
	eCircle AG, Munich, Germany
	+49-89-12009-703

Re: HBase client query / required configs for a hbase client

Posted by Bob Schulze <b....@ecircle.com>.
Ok, to answer myself: to write a standalone hbase client, it seems to be
enough to

* set up the zookeeper server(s) to  ask around:
  HConstants.ZOOKEEPER_QUORUM ("hbase.zookeeper.quorum")
* if different from std, set the zk port
   "hbase.zookeeper.property.clientPort"
* if different from std, , set the port to the region and master servers
* add hadoop, hbase and zookeeper jars to your project.
* open the ports to the hbase servers and to zk

In my case, the zookeeper port was not open in the firewalls...

Bob

...