Database Reference
In-Depth Information
You also need to tell HBase that it will not be managing the ZooKeeper quorum, because ZooKeeper is already
running. To do so, set up the following variable in the Linux hadoop account environment (I have defined this in my
environment via an entry in $HOME/.bashrc, as follows):
export HBASE_MANAGES_ZK=false
You must make sure that Hadoop and HBase are using the same version of Hadoop core libraries, so issue a pair
of cd and ls commands to check the versions:
[hadoop@hc1r1m2 lib]$ cd /usr/local/hbase/lib
[hadoop@hc1r1m2 lib]$ ls -l hadoop-core-*.jar
-rwxrwxr-x. 1 hadoop hadoop 2707856 Feb 10 2011 hadoop-core-0.20-append-r1056497.jar
[hadoop@hc1r1m2 hadoop]$ cd $HADOOP_PREFIX
[hadoop@hc1r1m2 hadoop]$ ls -l hadoop-core-*.jar
-rw-rw-r--. 1 hadoop hadoop 4203147 Jul 23 2013 hadoop-core-1.2.1.jar
As you can see, the versions don't match. The HBase Hadoop core file (hadoop-core-0.20-append-r1056497.
jar) is at version 0.20, while the Hadoop jar file (hadoop-core-1.2.1.jar) is at version 1.2.1. Currently, if you tried to run
HBase, it would fail with a connect exception.
You already know from the Hadoop installation you carried out in Chapter 2 that the Hadoop installation is
version 1.2.1. To work with the Hadoop installation, HBase must use the same version of Hadoop libraries. You copy
this library into place, as follows:
[hadoop@hc1r1m2 hadoop]$ cp $HADOOP_PREFIX/hadoop-core-*.jar /usr/local/hbase/lib
[hadoop@hc1r1m2 hadoop]$ cd /usr/local/hbase/lib
[hadoop@hc1r1m2 hadoop]$ mv hadoop-core-0.20-append-r1056497.jar hadoop-core-0.20-append-r1056497.
jar.save
Check the version of the Hadoop commons configuration jar file being used by HBase. This library assists with
the reading of configuration and preference files. If the version is different, then it can be updated by copying the
Hadoop version into place. (This will avoid errors like “NoClassDefFoundError” when you try to run HBase.) Use the
command sequence:
[root@hc1r1m2 lib]# cd /usr/local/hadoop/lib/
[root@hc1r1m2 lib]# ls commons-configuration*
/usr/local/hadoop/lib/commons-configuration-1.6.jar
That shows that the Hadoop version of this file is 1.6. You copy it to the HBase library area:
[root@hc1r1m2 lib]# cd /usr/local/hbase/lib
[root@hc1r1m2 lib]# cp /usr/local/hadoop/lib/commons-configuration* .
Now, you can try starting HBase by using the start script in the HBase bin directory:
[hadoop@hc1r1m2 ~]$ cd /usr/local/hbase
[hadoop@hc1r1m2 hbase]$ ./bin/start-hbase.sh
starting master, logging to
/usr/local/hbase/logs/hbase-hadoop-master-hc1r1m2.out
 
Search WWH ::




Custom Search