在編譯存取HBase的Java程式之前,需先將HBase的部份檔案複製到Hadoop的lib才能順利編譯

將hbase-*.jar、zookeeper-3.2.2.jar、hbase-0.20.6-transactional.jar三個jar檔複製到hadoop/lib之中

cp hbase-*.jar lib/zookeeper-3.2.2.jar /home/johnson4932/hadoop/lib/

ln -s /home/johnson4932/hbase/lib/* /home/johnson4932/hadoop/lib/
ln -s /home/johnson4932/hbase/conf/* /home/johnson4932/hadoop/conf/
ln -s /home/johnson4932/hbase/bin/* /home/johnson4932/hadoop/bin/

接著重啟Hbase 及 Hadoop

Categories: Hadoop