ambari-phoenix监控数据查看方法

来源:互联网 发布:linux yum 安装 jdk 编辑:程序博客网 时间:2024/05/27 06:54

近日在研究ambari项目,需要查看下ambari的监控数据的具体情况。

1.查看ambari项目对应的phoenix版本为4.4.0.2.3.4.0-3347。

  <properties>    <!-- Needed for generating FindBugs warnings using parent pom -->    <!--<yarn.basedir>${project.parent.parent.basedir}</yarn.basedir>-->    <protobuf.version>2.5.0</protobuf.version>    <hadoop.version>2.7.1.2.3.4.0-3347</hadoop.version>    <phoenix.version>4.4.0.2.3.4.0-3347</phoenix.version>    <hbase.version>1.1.2.2.3.4.0-3347</hbase.version>  </properties>

2.下载对应的phoenix包。
link

3.解压安装包后,进行访问

./bin/sqlline.py 172.16.31.183:2181

异常出现,出现/hbase不存在的问题

17/08/15 09:58:08 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.

4.因为ambari默认使用的是单机版本的hbase,所以使用的是内置的zookeeper,
初步怀疑为zookeeper端口和集群的zookeeper出现冲突,
ambari-metric在hadoop183节点,查看集群,发现该节点确实也存在集群的zookeeper。
查看ambari-metric的zookeeper配置,发现端口为{{zookeeper_clientPort}},该变量未找到。

如果端口冲突,则必然有一个服务会报错,但是两者都没有异常显示,则应该端口没有冲突。
但是zookeeper_clientPort这个端口的定义没有找到。

这里我将该端口重新指定为7777,然后重启ambari-metric服务。

5.重启后,重新连接数据库

./bin/sqlline.py 172.16.31.183:2181

异常依然存在,还是同样的问题,/hbase不存在

17/08/15 09:58:08 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.

6.这时我决定到zookeeper里面具体看看,/hbase是否真的不存在。
根据之前的经验,/hbase是hbase在zookeeper的存储目录,如果没有该目录,则hbase无法正常运行。

这里需要用到单机版hbase访问zookeeper的方法。

hbase zkcli -server localhost:7777 ls /hbase

返回结果发现,/hbase确实不存在。

Node does not exist: /hbase

这就奇怪了,难道说没存在/hbase里面。
查询了下根目录的情况,发现根目录下只有zookeeper和ams-hbase-unsecure两个目录。

[zookeeper, ams-hbase-unsecure]

发现ams-hbase-unsecure很可疑,具体查看,果然该目录即为hbase信息的存储路径。

[meta-region-server, rs, splitWAL, backup-masters, table-lock, flush-table-proc, region-in-transition, online-snapshot, switch, master, running, recovering-regions, draining, rolllog-proc, namespace, hbaseid, table]

7.查到这里,就真相大白了,原来改了存储目录。
这里指定目录进行查询,成功进入phoenix命令行。

./bin/sqlline.py 172.16.31.183:7777:/ams-hbase-unsecure
原创粉丝点击