1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| # docker exec -it zookeeper /bin/bash
# cd apache-zookeeper-3.5.5/bin
$ ./zkCli.sh -server 127.0.0.1:2181
[zk: 127.0.0.1:2181(CONNECTED) 1] create -e /test-node 123456
[zk: 127.0.0.1:2181(CONNECTED) 2] ls / [test-node, zookeeper]
[zk: 127.0.0.1:2181(CONNECTED) 3] get /test-node 123456 cZxid = 0x4 ctime = Fri Feb 22 02:27:43 UTC 2019 mZxid = 0x4 mtime = Fri Feb 22 02:27:43 UTC 2019 pZxid = 0x4 cversion = 0 dataVersion = 0 aclVersion = 0 ephemeralOwner = 0x1000a766c5e0001 dataLength = 6 numChildren = 0
[zk: 127.0.0.1:2181(CONNECTED) 4] quit
|