Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

zookeeper register components

avatar
Super Collaborator

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

avatar

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

avatar

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]

avatar
Super Collaborator

thank you @Jonas Straub

avatar

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]

avatar
Super Collaborator

thank you @Deepesh