我使用的是Sandbox HDP 2.2
我做了一个很棒的安装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>发布于 2015-12-17 02:54:46
您必须在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准备就绪,并在$PATH上安装$JAVA_HOME和java之后,现在就可以运行sqlline.py了
$ ./sqlline.py localhost:2181/hbase-unsecure发布于 2015-07-05 14:56:01
您需要在连接字符串中指定根目录"/hbase-unsecure",因为在默认情况下,Phoenix会尝试连接到/hbase。试试这个:
Sqlline.py localhost:2181:/hbase-unsecure。/
https://stackoverflow.com/questions/31224439
复制相似问题