我下载,运行zkServer.sh start
,运行ps -ef|grep zoo
以确保它正在运行,然后运行zkCli.sh 127.0.0.1:2181
。该命令返回到 shell,并带有以下输出(截断以仅显示结尾)。任何想法表示赞赏。
2013-01-12 14:11:04,318 [myid:] - INFO [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@378f6235
ZooKeeper -server host:port cmd args
connect host:port
get path [watch]
ls path [watch]
set path data [version]
rmr path
delquota [-n|-b] path
quit
printwatches on|off
create [-s] [-e] path data acl
stat path [watch]
close
ls2 path [watch]
history
listquota path
setAcl path acl
getAcl path
sync path
redo cmdno
addauth scheme auth
delete path [version]
setquota -n|-b val path