Read this section in the HBase book...

http://hbase.apache.org/book.html#d427e2108

"Java client configuration"


-----Original Message-----
From: James McGlothlin [mailto:[email protected]] 
Sent: Monday, May 09, 2011 4:57 PM
To: [email protected]
Subject: just trying to get into HBase from java


I am able to utilize HBase from the shell with no problems.

However, I have been unable to access it from Java code.  I may very well be 
making some simple error but I am at a lost as all the examples I find do it 
the same way.

I have tried:

Configuration conf=  HBaseConfiguration.create(); HBaseAdmin hbase = new 
HBaseAdmin(conf); HTable gicp = new HTable(conf,"GICP");

and I have tried skipping the HBaseAdmin step:

Configuration conf=  HBaseConfiguration.create(); HTable gicp = new 
HTable(conf,"GICP");

and I have tried adding a dset step:

conf.dset("hbase.master","localhost:60000");

While the errors appear to all be zookeeper related, they are not consistent.

I am running hbase 0.90.1 on a 9 machine hadoop cluster.

Help would be greatly appreciated.  The conf creation always works and the next 
line always fails.  I can create tables from HBase shell with no problem.

All assistance is appreciated,

James McGlothlin
--
View this message in context: 
http://old.nabble.com/just-trying-to-get-into-HBase-from-java-tp31580562p31580562.html
Sent from the HBase User mailing list archive at Nabble.com.

Reply via email to