配置hbase时,需注意lib下Hadoop依赖jar是否与当前hadoop的版本一致

安装实例:

hadoop:hbadoop-2.7.4

hbase:hbase-1.2.6

此时,hbase-1.2.6/lib下的Hadoop依赖jar即hadoop-*.jar均是2.5.1版本,因此需要把2.7.4版本的hadoop-*.jar进行替换。

步骤:

1)#先删除hbase-1.2.6/lib下Hadoop依赖jar

cd /home/hbase-1.2.6/lib

rm  –rf  /home/hbase-1.2.6/lib/hadoop-*.jar

2) #添加2.7.4的jar

cp /home/hadoop/hadoop-2.7.4/share/hadoop/common/lib/hadoop-annotations-2.7.4.jar                        /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/common/lib/hadoop-auth-2.7.4.jar                               /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/common/hadoop-common-2.7.4.jar                                 /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/hdfs/hadoop-hdfs-2.7.4.jar                                     /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.7.4.jar                /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.7.4.jar             /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.7.4.jar               /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.7.4.jar          /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.7.4.jar            /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/yarn/hadoop-yarn-api-2.7.4.jar                                 /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/yarn/hadoop-yarn-client-2.7.4.jar                              /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/yarn/hadoop-yarn-common-2.7.4.jar                              /home/hadoop/hbase-1.2.6/lib/
cp /home/hadoop/hadoop-2.7.4/share/hadoop/yarn/hadoop-yarn-server-common-2.7.4.jar                       /home/hadoop/hbase-1.2.6/lib/

#hadoop-client-2.7.4.jar需要单独下载,因为一般是没有的
cp /home/hadoop/hadoop-client-2.7.1.jar                                                                                      /home/hadoop/hbase-1.2.6/lib/

你可能感兴趣的:(hbase)