我正在使用Sandbox HDP 2.2
我做了一个yum install phoenix(版本是4.2)
但是当我运行这些时:
./sqlline.py localhost:2181
./sqlline.py localhost
./sqlline.py sandbox.hortonworks.com:2181
./sqlline.py sandbox.hortonworks.com
我收到了错误:
15/07/03 08:26:31 ERROR client.ConnectionManager$HConnectionImplementation:
The node /hbase is not in ZooKeeper. It should have been written by the master.
Check the value configured in 'zookeeper.znode.parent'. There could be a mismatch
with the one configured in the master.
我试图跑:
./sqlline.py sandbox.hortonworks.com:2181:/hbase-unsecure
但它"挂起" - 20分钟后仍无响应
我在/etc/hbase/conf/hbase-site.xml中有这个:
<property>
<name>hbase.zookeeper.quorum</name>
<value>sandbox.hortonworks.com</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase-unsecure</value>
</property>
答案 0 :(得分:1)
您必须在sqlline.py
所在的目录中创建链接到HBase / Hadoop提供的2个.xml文件。
$ pwd
/usr/hdp/2.2.8.0-3150/phoenix/bin
$ ll | grep xml
lrwxrwxrwx 1 root root 29 Dec 16 13:34 core-site.xml -> /etc/hbase/conf/core-site.xml
lrwxrwxrwx 1 root root 30 Dec 16 13:34 hbase-site.xml -> /etc/hbase/conf/hbase-site.xml
在$JAVA_HOME
上使用java
和$PATH
后,您现在可以sqlline.py
运行:
$ ./sqlline.py localhost:2181/hbase-unsecure
答案 1 :(得分:0)
您需要在连接字符串中指定root dir "/hbase-unsecure"
,因为默认情况下Phoenix正在尝试连接到/ hbase。试试这个:
./ sqlline.py localhost:2181:/ hbase-unsecure