一、命令描述
二、各个命令的讲解
1、启动客户端
[test@hadoop153 zookeeper-3.4.10]$ bin/zkCli.sh
2、显示所有操作命令
[zk: localhost:2181(CONNECTED) 0] help
ZooKeeper -server host:port cmd args
stat path [watch]
set path data [version]
ls path [watch]
delquota [-n|-b] path
ls2 path [watch]
setAcl path acl
setquota -n|-b val path
history
redo cmdno
printwatches on|off
delete path [version]
sync path
listquota path
rmr path
get path [watch]
create [-s] [-e] path data acl
addauth scheme auth
quit
getAcl path
close
connect host:port
3、查看当前 znode 中所包含的内容
[zk: localhost:2181(CONNECTED) 1] ls /
[zookeeper]
4、查看当前节点详细数据
[zk: localhost:2181(CONNECTED) 2] ls2 /
[zookeeper]
cZxid = 0x0
ctime = Thu Jan 01 08:00:00 CS