0

I'm a beginner in Hadoop and MapReduce. After I installed Hadoop on my Ubuntu VM, I tried some starter examples like Wordcount and Anagram.

I would like to do an Apriori on MapReduce. I found this one on Sourceforge (http://sourceforge.net/p/apriorimapred/wiki/Home/).

After I download and installed some required components such as HBase and Log4j (though I have problems installing log4j so I chose to disable them by setting the level to off),

I struggle with the problem

"Error: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration" -- as in the picture. (https://dl.dropboxusercontent.com/u/51053996/Pics/hadoop%20classnotfound.jpg)

It happens every time I would like to run the jar file. The steps I take are

1. javac -cp "$HADOOP_HOME/share/hadoop/mapreduce/hadoop-common-2.0.0-alpha.jar:$HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.0.2-alpha.jar:$HADOOP_HOME/lib/commons-configuration-1.10/*:/usr/local/apache-log4j-1.2.17/log4j-1.2.17.jar:/usr/lib/hbase/hbase-0.94.8/hbase-0.94.8.jar" apriori.java

2. jar -cvf apriori.jar -C . .

3. $HADOOP_HOME/bin/hadoop jar /home/hduser/yarn/hadoop-2.5.1/share/hadoop/mapreduce/apriori.jar apriori /in /out2 /out2c /out2a

(The problem happens after I enter the command in step 3) There is no error shown after I compiled in step 1 (However, I have tried compiling while not including the "/usr/lib/hbase/hbase-0.94.8/hbase-0.94.8.jar" and there are around 100 errors -- so I guess the lib works well).

I stick with this problem for around 2 weeks :( and couldn't find any working solutions. I have tried many suggestion I found such as fixing the environment variables, add some lines in hbase-env.sh, etc. Here are some that I bookmarked them (but didn't solve mine).

Thank you so much and really appreciated every help,

Spacez

Community
  • 1
  • 1
Spacez
  • 65
  • 1
  • 9

4 Answers4

1

I was using hbase-098.8-hadoop2 with nutch 2.3.1 (gora 0.6.1) and encountered the same error. It was fixed after I added the following line to $NUTCH_ROOT/ivy/ivy.xml:

<dependency org="org.apache.hbase" name="hbase-common" rev="0.98.8-hadoop2" conf="*->default" />

This is mentioned as a gora bug in the official Nutch 2 tutorial.

Markus
  • 2,058
  • 24
  • 25
0

You can try to copy hbase-{vsersion}.jar from $HBASE_HOME to $HADOOP_HOME/lib

mashuai
  • 561
  • 3
  • 10
0

I have solved this by re-installing Hadoop and HBase with compatible versions (I'm using Hadoop 2.5.1 and HBase 0.98.11). Also, adding correct classpaths of the Hadoop and Hbase jars in the hadoop-env.

Spacez
  • 65
  • 1
  • 9
0

As for me, i simply ran:

 export HADOOP_CLASSPATH=`~/hbase/bin/hbase classpath`
java  -cp "$HADOOP_CLASSPATH:target/<myjar>.jar" <path_to>.<myHBaseClass>
matthieu lieber
  • 652
  • 14
  • 29