将hive、hbase整合后,利用hive对存储在hbase的表进行select操作,在进行map、reduce操作的时候,总会出现reduce运行到67%再就没有响应,然后通过web页面检查job的出错日志,发现显示找不到zookeeper的错误如下所示:
2014-01-22 20:18:25,653 INFO org.apache.zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (Unable to locate a login configuration)
2014-01-22 20:18:25,653 WARN org.apache.zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnectat org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1068)
解决的方法就是修改hadoop-env.sh配置文件,给环境变量HADOOP_CLASSPATH加入hbase配置文件所在的路径,可以参考http://stackoverflow.com/questions/19586528/zookeeper-connecting-to-localhost