Kareem,
Have you built Hadoop from its sources by using Ant or have
you
downloaded the (precompiled) distribution?
Only in the first case you actually have both
$/build/classes and
$/build/contrib/hbase/classes.
And in this case, are you sure that the HADOOP_HOME variable
is properly
set in the environment where you compile your class?
If you downloaded the (e.g. 0.15.0) distribution then you
have to add
the $/hadoop-0.15.0-core.jar and
$/contrib/hadoop-0.15.0-hbase.jar.
...and again, be sure to have HADOOP_HOME properly set.
Cheers,
Holger
Kareem Dana wrote:
> Are there any instructions for setting the classpath to
correctly
> compile your own simple hbase example program?
>
> All I've written so far is a main class that loads up
an hbase conf as
> shown: HBaseConfiguration conf = new
HBaseConfiguration();
>
> When I try to compile with javac:
> HBaseHelloWorld.java:2: package org.apache.hadoop does
not exist
> import org.apache.hadoop.hbase;
> ^
> HBaseHelloWorld.java:9: cannot find symbol
> symbol : class HBaseConfiguration
> location: class HBaseHelloWorld
> HBaseConfiguration conf = new
HBaseConfiguration();
> ^
> HBaseHelloWorld.java:9: cannot find symbol
> symbol : class HBaseConfiguration
> location: class HBaseHelloWorld
> HBaseConfiguration conf = new
HBaseConfiguration();
> ^
> 3 errors
>
> What directories should be in my classpath and what
packages should I
> import? I really just want access to
HBaseConfiguration, HBaseAdmin,
> and HTable. I tried to import org.apache.hadoop.hbase
and
> org.apache.hadoop. I set my classpath to
$/build/classes
> and $/build/contrib/hbase/classes. I am
also trying to
> compile my "hello world" program outside of
the hadoop source tree.
>
> - Kareem
>
|