hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ideal <idealit...@gmail.com>
Subject About using hbase's java API
Date Wed, 25 Feb 2009 05:02:41 GMT
Hi, all,

I am new to hadoop and hbase.

I set up a hadoop cluster with two computers, and install hbase on top of
hadoop. hbase is running on hadoop's master node. The version of both hadoop
and hbase is 0.19.0.

I need to using java program to access hbase, so I copy the
${HADOOP_HOME}/contrib/eclipse-plugin/hadoop-0.19.0-eclipse-plugin.jar to
/usr/local/lib/eclipse/plugins, and restart eclipse, but seems that not
work, is it the problem because of the eclipse's version? My eclipse is
Version: 3.2.2.

So I have to create a normal java project, and in the project's properties
dialog, in Java Build Path -> Libraries, click Add External Jars, I add 3
jars, which are {HADOOP_HOME}/hadoop-0.19.0-core.jar,
{HADOOP_HOME}/lib/commons-logging-api-1.0.4.jar, and
{HBASE_HOME}/hbase-0.19.0.jar, and then I run the java program, there are no
compile error. But it can't connect to hbase master. After searching through
the web, I add a line "config.set("hbase.master","");"
below "HBaseConfiguration config = new HBaseConfiguration();" in the
program, ( is computer's ip addr here). And it works. May the
problem is because that HBaseConfiguration didn't load the configuration of
hbase. So I want to ask that am I doing the right way to using hbase's java
API? Any other way to tell HBaseConfiguration to load the configuration of

Thank you!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message