Add the $HBASE_HOME/conf directory to your CLASSPATH in eclipse: Project
Properites -> Java Build Path -> Libraries -> Add Class Folder.
St.Ack

On Tue, Feb 24, 2009 at 9:02 PM, ideal <[email protected]> wrote:

> 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","202.112.147.166:60000
> ");"
> below "HBaseConfiguration config = new HBaseConfiguration();" in the
> program, (202.112.147.166 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
> hbase?
>
> Thank you!
>
> regards,
> ideal
>

Reply via email to