Skip to main content

zookeeper cli client

Project description

I hope I can operate zookeeper path like localfile system

INSTALL

install from pypi:

pip install zoo_cmd

install from source:

git clone git@github.com:liujinliu/zoo_cmd.git
cd zoo_cmd
make install
make uninstall ---UNDEPLOY METHOD

USEAGE

[liujinliu@liujinliu zoo_cmd]$ zk_cmd
zoo#> conn 127.0.0.1:2181    ---连接zookeeper
zoo@127.0..01:2181#> addauth digest zkljl 123456  ----acl策略设置(如果目标zk设置了acl的话)
zoo@127.0.0.1:2181#> ls           ----查看当前节点下的子节点
+ zookeeper           2016-02-03 16:25:12
+ test                2016-02-03 16:25:12
zoo@127.0.0.1:2181#> wc           ----查看当前节点下的子节点个数
2
zoo@127.0.0.1:2181#> cd test      ----进入子节点路径(支持跟绝对路径参数,类似"/test/docker"这种)
/test
zoo@127.0.0.1:2181#> ls           ----查看当前节点下的子节点
+ docker              2016-02-03 16:25:12
zoo@127.0.0.1:2181#> cd docker    ----if only there is only one child, you can also use cdcd
/test/docker
zoo@127.0.0.1:2181#> ls
+ acb896d8            2016-02-03 16:25:12
zoo@127.0.0.1:2181#> touch tmp_ljl   ----创建新节点
/test/docker/tmp_ljl
zoo@127.0.0.1:2181#> set tmp_ljl csdn0   ----向节点写入内容(会覆盖原有内容)
ZnodeStat(czxid=313532612647, ...... pzxid=313532612647)
zoo@127.0.0.1:2181#> cat tmp_ljl    ----查看节点内容
csdn0
zoo@127.0.0.1:2181#> pwd             ----查看当前所处的绝对路径
/test/docker
zoo@127.0.0.1:2181#> ls
- tmp_ljl             2016-02-03 16:25:12
acb896d8
zoo@127.0.0.1:2181#> rm tmp_ljl  ----删除节点
None
zoo@127.0.0.1:2181#> cd ..      ----回退(同时支持类似于"../.."这样的回退多层路径)
/test
zoo@127.0.0.1:2181#> ls
+ gary                               2016-11-06 10:40:04
+ zookeeper

use vi to edit the node:

zoo@127.0.0.1:2181#> 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.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zoo_cmd-1.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file zoo_cmd-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: zoo_cmd-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.2

File hashes

Hashes for zoo_cmd-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 010af3e058a6c5ffd61f9dc870a5ebcb3e725fce9a7ecaaab0840b27aa091c87
MD5 a0476588edd14bc4986648100189868b
BLAKE2b-256 22e933ee0abef977f3b811d45fc146a90757979bcc04222f57c29770d459c2c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page