3

我正在使用沙盒 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>
4

2 回答 2

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_HOMEjava$PATH现在可以运行sqlline.py

$ ./sqlline.py localhost:2181/hbase-unsecure
于 2015-12-16T18:54:46.023 回答
0

您需要"/hbase-unsecure"在连接字符串中指定根目录,因为默认情况下 Phoenix 正在尝试连接到 /hbase。尝试这个:

./sqlline.py localhost:2181:/hbase-unsecure

于 2015-07-05T06:56:01.370 回答