Support Questions

Find answers, ask questions, and share your expertise

zookeeper register components

Expert Contributor

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

1 ACCEPTED SOLUTION

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]

View solution in original post

4 REPLIES 4

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]

Expert Contributor

thank you @Jonas Straub

Master Collaborator

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]

Expert Contributor

thank you @Deepesh