标签:cte set redo mtime stat syn clu val vim
Tar -zxvf zookeeper-3.4.10.tar.gz客户端有相同版本的zookeeper-3.4.10包文件(从远程zookeeper节点拷贝而来)
客户端登录
[root@hslave3 bin]# ./zkCli.sh -server hmaster:2181
[zk: hmaster:2181(CONNECTED) 0] help
ZooKeeper -server host:port cmd args
stat path [watch]
set path data [version]
ls path [watch]
delquota [-n|-b] path
ls2 path [watch]
setAcl path acl
setquota -n|-b val path
history
redo cmdno
printwatches on|off
delete path [version]
sync path
listquota path
rmr path
get path [watch]
create [-s] [-e] path data acl
addauth scheme auth
quit
getAcl path
close
connect host:port
[zk: hmaster:2181(CONNECTED) 1] ls /
一致,有头,数据树
[zk: hslave1:2181(CONNECTED) 0] ls /
[zookeeper]
[zk: hslave1:2181(CONNECTED) 1] create /app app_content
Created /app
[zk: hslave1:2181(CONNECTED) 2] ls /
[app, zookeeper]
[zk: hslave1:2181(CONNECTED) 3] get /app
app_content
cZxid = 0x200000002
ctime = Mon Dec 10 21:43:19 EST 2018
mZxid = 0x200000002
mtime = Mon Dec 10 21:43:19 EST 2018
pZxid = 0x200000002
cversion = 0
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 11
numChildren = 0
[zk: hslave1:2181(CONNECTED) 4] set /app appcontent11
cZxid = 0x200000002
ctime = Mon Dec 10 21:43:19 EST 2018
mZxid = 0x200000003
mtime = Mon Dec 10 21:45:05 EST 2018
pZxid = 0x200000002
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 12
numChildren = 0
[zk: hslave1:2181(CONNECTED) 5] get /app
appcontent11
cZxid = 0x200000002
ctime = Mon Dec 10 21:43:19 EST 2018
mZxid = 0x200000003
mtime = Mon Dec 10 21:45:05 EST 2018
pZxid = 0x200000002
cversion = 0
dataVersion = 1
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 12
numChildren = 0
[zk: hslave1:2181(CONNECTED) 6] delete /app
[zk: hslave1:2181(CONNECTED) 7] ls /
[zookeeper]
标签:cte set redo mtime stat syn clu val vim
原文地址:http://blog.51cto.com/6000734/2328724