Skip to main content

zookeeper cli client

Project description

I hope I can operate zookeeper path like localfile system


install from pypi:

pip install zoo_cmd

install from source:

git clone
cd zoo_cmd
make install
make uninstall ---UNDEPLOY METHOD


[liujinliu@liujinliu zoo_cmd]$ zk_cmd
zoo#> conn
zoo@> help
Documented commands (type help <topic>):
conn  help

Undocumented commands:
cat  cd  cdcd  exit  ls  pwd  rm  set  touch  vi  wc
zoo@> ls           ----查看当前节点下的子节点
+ zookeeper           2016-02-03 16:25:12
+ test                2016-02-03 16:25:12
zoo@> wc           ----查看当前节点下的子节点个数
zoo@> cd test      ----进入子节点路径(支持跟绝对路径参数,类似"/test/docker"这种)
zoo@> ls           ----查看当前节点下的子节点
+ docker              2016-02-03 16:25:12
zoo@> cd docker    ----if only there is only one child, you also use cdcd
zoo@> ls
+ acb896d8            2016-02-03 16:25:12
zoo@> touch tmp_ljl   ----创建新节点
zoo@> set tmp_ljl csdn0   ----向节点写入内容(会覆盖原有内容)
ZnodeStat(czxid=313532612647, ...... pzxid=313532612647)
zoo@> cat tmp_ljl    ----查看节点内容
zoo@> pwd             ----查看当前所处的绝对路径
zoo@> ls
- tmp_ljl             2016-02-03 16:25:12
zoo@> rm tmp_ljl  ----删除节点
zoo@> cd ..      ----回退(同时支持类似于"../.."这样的回退多层路径)
zoo@> ls
+ gary                               2016-11-06 10:40:04
+ zookeeper                               1970-01-01 08:00:00
zoo@> cat gar*/tmp*

use vi to edit the node:

zoo@> vi tmp_ljl

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for zoo_cmd, version 1.0.2
Filename, size File type Python version Upload date Hashes
Filename, size zoo_cmd-1.0.2.linux-i686.tar.gz (7.7 kB) File type Dumb Binary Python version any Upload date Hashes View
Filename, size zoo_cmd-1.0.2.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page