1、HBase Jar包拷贝到Hive/lib目录下
因为在操作Hive的同时对HBase也会产生影响,所以Hive需要持有操作HBase的Jar包,那么接下来拷贝Hive所依赖的Jar包(或者使用软连接的形式)
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/hbase-common-1.2.5.jar $HIVE_HOME/lib/hbase-common-1.2.5.jar
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/hbase-server-1.2.5.jar $HIVE_HOME/lib/hbase-server-1.2.5.jar
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/hbase-client-1.2.5.jar $HIVE_HOME/lib/hbase-client-1.2.5.jar
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/hbase-protocol-1.2.5.jar $HIVE_HOME/lib/hbase-protocol-1.2.5.jar
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/hbase-it-1.2.5.jar $HIVE_HOME/lib/hbase-it-1.2.5.jar
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/htrace-core-3.1.0-incubating.jar $HIVE_HOME/lib/htrace-core-3.1.0-incubating.jar
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/hbase-hadoop2-compat-1.2.5.jar $HIVE_HOME/lib/hbase-hadoop2-compat-1.2.5.jar
[victor@node1 ~]$ ln -s $HBASE_HOME/lib/hbase-hadoop-compat-1.2.5.jar $HIVE_HOME/lib/hbase-hadoop-compat-1.2.5.jar
2、环境变量
在 /etc/profile 中配置 或者 在ssh窗口中执行
export HBASE_HOME=/opt/module/hbase-1.2.5
export HIVE_HOME=/opt/module/apache-hive-1.2.1-bin
3、hive-site.xml配置zookeeper属性
<property>
<name>hive.zookeeper.quorum</name>
<value>node1,node2,node3</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>