在kafka的bin目录下面,按如下操作即可
# 进入zookeeper客户端
[root@localhost bin]# ./zookeeper-shell.sh localhost:2181
Connecting to localhost:2181
Welcome to ZooKeeper!
JLine support is disabled
WATCHER::
WatchedEvent state:SyncConnected type:None path:null
# 查看客户端里面的节点信息
ls /broker/ids
Node does not exist: /broker/ids
ls /
[admin, brokers, cluster, config, consumers, controller, controller_epoch, isr_change_notification, latest_producer_id_block, log_dir_event_notification, zookeeper]
ls /brokers/ids
[0, 1, 2]