ZooKeeper客戶端常用命令
阿新 • • 發佈:2019-02-10
ZooKeeper -server host:port cmd args 功能:連線ZooKeeper服務端,例項(zkCli.cmd -server 127.0.0.1:2181) connect host:port get path [watch] 功能:檢視znode節點資料 ls path [watch] set path data [version] 功能:修改znode節點資料 delquota [-n|-b] path quit 功能:退出 printwatches on|off create [-s] [-e] path data acl 功能:增加一個znode節點,例項(create /zk_test my_data),This creates a new znode and associates the string "my_data" with the node 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] 功能:刪除一個znode節點,例項(delete /zk_test) setquota -n|-b val path
參考:
1、https://zookeeper.apache.org/doc/r3.3.3/zookeeperStarted.html
2、zookeeper使用和原理探究(一)
http://www.blogjava.net/BucketLi/archive/2010/12/21/341268.html