Created 01-21-2016 01:25 AM
is there any command which can give us the list of components that are registered with znode in real time?
i want to see what are the hiveservers that are registered with zookeeper...etc
Created 01-21-2016 06:05 AM
Hive-Servers are managed via Zookeeper, so you can connect to Zookeeper ...
zookeeper-client -server <zookeeper-server>
...and read the "hiverserver2" Znode (Note: the Znode is configured via hive.server2.zookeeper.namespace)
ls /hiveserver2
As a result you get all the available Hive-Servers
[serverUri=horton02.example.com:10000;version=1.2.1.2.3.2.0-2950;sequence=0000000014, serverUri=horton03.example.com:10000;version=1.2.1.2.3.2.0-2950;sequence=0000000015]
Created 01-21-2016 06:05 AM
Hive-Servers are managed via Zookeeper, so you can connect to Zookeeper ...
zookeeper-client -server <zookeeper-server>
...and read the "hiverserver2" Znode (Note: the Znode is configured via hive.server2.zookeeper.namespace)
ls /hiveserver2
As a result you get all the available Hive-Servers
[serverUri=horton02.example.com:10000;version=1.2.1.2.3.2.0-2950;sequence=0000000014, serverUri=horton03.example.com:10000;version=1.2.1.2.3.2.0-2950;sequence=0000000015]
Created 01-21-2016 02:45 PM
thank you @Jonas Straub
Created 01-21-2016 06:08 AM
To view the registered hiveservers you can use the zkCli.
$ /usr/hdp/current/zookeeper-client/bin/zkCli.sh [zk: localhost:2181(CONNECTED) 0] ls /hiveserver2 [serverUri=node-1.example.com:10000;version=x.x.x.2.3.2.0-xx;sequence=0000000000]
Created 01-21-2016 02:46 PM
thank you @Deepesh