Hive与HBase的兼容配置
1、创建软连接
ln -s $HBASE_HOME/lib/hbase-common-1.4.8.jar $HIVE_HOME/lib/hbase-common-1.4.8.jar
ln -s $HBASE_HOME/lib/hbase-server-1.4.8.jar $HIVE_HOME/lib/hbase-server-1.4.8.jar
ln -s $HBASE_HOME/lib/hbase-client-1.4.8.jar $HIVE_HOME/lib/hbase-client-1.4.8.jar
ln -s $HBASE_HOME/lib/hbase-protocol-1.4.8.jar $HIVE_HOME/lib/hbase-protocol-1.4.8.jar
ln -s $HBASE_HOME/lib/hbase-it-1.4.8.jar $HIVE_HOME/lib/hbase-it-1.4.8.jar
ln -s $HBASE_HOME/lib/htrace-core-3.1.0-incubating.jar $HIVE_HOME/lib/htrace-core-3.1.0-incubating.jar
ln -s $HBASE_HOME/lib/hbase-hadoop2-compat-1.4.8.jar $HIVE_HOME/lib/hbase-hadoop2-compat-1.4.8.jar
ln -s $HBASE_HOME/lib/hbase-hadoop-compat-1.4.8.jar $HIVE_HOME/lib/hbase-hadoop-compat-1.4.8.jar
2、在 hive-site.xml 中修改 zookeeper 的属性
<property>
<name>hive.zookeeper.quorum</name>
<value>hadoop101,hadoop102,hadoop103</value>
<description>The list of ZooKeeper servers to talk to. This is only needed for read/write locks.
</description>
</property>
<property>
<name>hive.zookeeper.client.port</name>
<value>2181</value>
<description>The port of ZooKeeper servers to talk to. This is only needed for read/write locks.
</description>
</property>
3、重新编译hbase-handler(不兼容时执行)
(1) 新建java项目
(2) 导入hbase-handler的src
(3) 导入hbase与hive的jar
(4) 打包项目并命名为hive_hbase_handler-1.2.2.jar