zookeeper命令查看注册路径及消费路径
[root@localhost zookeeper-3.4.10]# cd bin[root@localhost bin]# lltotal 36-rwxr-xr-x. 1 1001 1001 232 Mar 23 2017 README.txt-rwxr-xr-x. 1 1001 1001 1937 Mar 23 2017 zkCleanup.sh-rwxr-xr-x.
·
[root@localhost zookeeper-3.4.10]# cd bin
[root@localhost bin]# ll
total 36
-rwxr-xr-x. 1 1001 1001 232 Mar 23 2017 README.txt
-rwxr-xr-x. 1 1001 1001 1937 Mar 23 2017 zkCleanup.sh
-rwxr-xr-x. 1 1001 1001 1056 Mar 23 2017 zkCli.cmd
-rwxr-xr-x. 1 1001 1001 1534 Mar 23 2017 zkCli.sh
-rwxr-xr-x. 1 1001 1001 1628 Mar 23 2017 zkEnv.cmd
-rwxr-xr-x. 1 1001 1001 2696 Mar 23 2017 zkEnv.sh
-rwxr-xr-x. 1 1001 1001 1089 Mar 23 2017 zkServer.cmd
-rwxr-xr-x. 1 1001 1001 6773 Mar 23 2017 zkServer.sh
[root@localhost bin]# jps
2933 Jps
2761 QuorumPeerMain
[root@localhost bin]# sh zkCli.sh -server localhost:2181
Connecting to localhost:2181
[zk: localhost:2181(CONNECTED) 0] ls /
[dubbo, zookeeper]
[zk: localhost:2181(CONNECTED) 2] get /dubbo(无用操作)
null
cZxid = 0x200000002
ctime = Mon Jan 29 08:04:09 PST 2018
mZxid = 0x200000002
mtime = Mon Jan 29 08:04:09 PST 2018
pZxid = 0x200000003
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: localhost:2181(CONNECTED) 3] 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: localhost:2181(CONNECTED) 4] ls /dubbo
[org.yf.service.PersonService]
[zk: localhost:2181(CONNECTED) 5] ls2 /dubbo
[org.yf.service.PersonService]
cZxid = 0x200000002
ctime = Mon Jan 29 08:04:09 PST 2018
mZxid = 0x200000002
mtime = Mon Jan 29 08:04:09 PST 2018
pZxid = 0x200000003
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: localhost:2181(CONNECTED) 6] ls2 /dubbo/org.yf.service.PersonService
[consumers, configurators, routers, providers]
cZxid = 0x200000003
ctime = Mon Jan 29 08:04:10 PST 2018
mZxid = 0x200000003
mtime = Mon Jan 29 08:04:10 PST 2018
pZxid = 0x20000000c
cversion = 4
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 4
[zk: localhost:2181(CONNECTED) 7] ls2 /dubbo/org.yf.service.PersonService/consumers
[consumer%3A%2F%2F192.168.1.102%2Forg.yf.service.PersonService%3Fapplication%3Duser-consumer%26category%3Dconsumers%26check%3Dfalse%26dubbo%3D2.5.8%26interface%3Dorg.yf.service.PersonService%26methods%3DgetPerson%2CselectPersonById%26pid%3D2544%26side%3Dconsumer%26timestamp%3D1517241861616]
cZxid = 0x200000008
ctime = Mon Jan 29 08:04:32 PST 2018
mZxid = 0x200000008
mtime = Mon Jan 29 08:04:32 PST 2018
pZxid = 0x200000009
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: localhost:2181(CONNECTED) 9] ls2 /dubbo/org.yf.service.PersonService/providers
[dubbo%3A%2F%2F192.168.1.102%3A20880%2Forg.yf.service.PersonService%3Fanyhost%3Dtrue%26application%3Dorders-provider%26dubbo%3D2.5.8%26generic%3Dfalse%26interface%3Dorg.yf.service.PersonService%26methods%3DgetPerson%2CselectPersonById%26pid%3D1748%26side%3Dprovider%26timestamp%3D1517241822844]
cZxid = 0x200000004
ctime = Mon Jan 29 08:04:10 PST 2018
mZxid = 0x200000004
mtime = Mon Jan 29 08:04:10 PST 2018
pZxid = 0x200000005
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[root@localhost bin]# ll
total 36
-rwxr-xr-x. 1 1001 1001 232 Mar 23 2017 README.txt
-rwxr-xr-x. 1 1001 1001 1937 Mar 23 2017 zkCleanup.sh
-rwxr-xr-x. 1 1001 1001 1056 Mar 23 2017 zkCli.cmd
-rwxr-xr-x. 1 1001 1001 1534 Mar 23 2017 zkCli.sh
-rwxr-xr-x. 1 1001 1001 1628 Mar 23 2017 zkEnv.cmd
-rwxr-xr-x. 1 1001 1001 2696 Mar 23 2017 zkEnv.sh
-rwxr-xr-x. 1 1001 1001 1089 Mar 23 2017 zkServer.cmd
-rwxr-xr-x. 1 1001 1001 6773 Mar 23 2017 zkServer.sh
[root@localhost bin]# jps
2933 Jps
2761 QuorumPeerMain
[root@localhost bin]# sh zkCli.sh -server localhost:2181
Connecting to localhost:2181
[zk: localhost:2181(CONNECTED) 0] ls /
[dubbo, zookeeper]
[zk: localhost:2181(CONNECTED) 2] get /dubbo(无用操作)
null
cZxid = 0x200000002
ctime = Mon Jan 29 08:04:09 PST 2018
mZxid = 0x200000002
mtime = Mon Jan 29 08:04:09 PST 2018
pZxid = 0x200000003
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: localhost:2181(CONNECTED) 3] 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: localhost:2181(CONNECTED) 4] ls /dubbo
[org.yf.service.PersonService]
[zk: localhost:2181(CONNECTED) 5] ls2 /dubbo
[org.yf.service.PersonService]
cZxid = 0x200000002
ctime = Mon Jan 29 08:04:09 PST 2018
mZxid = 0x200000002
mtime = Mon Jan 29 08:04:09 PST 2018
pZxid = 0x200000003
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: localhost:2181(CONNECTED) 6] ls2 /dubbo/org.yf.service.PersonService
[consumers, configurators, routers, providers]
cZxid = 0x200000003
ctime = Mon Jan 29 08:04:10 PST 2018
mZxid = 0x200000003
mtime = Mon Jan 29 08:04:10 PST 2018
pZxid = 0x20000000c
cversion = 4
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 4
[zk: localhost:2181(CONNECTED) 7] ls2 /dubbo/org.yf.service.PersonService/consumers
[consumer%3A%2F%2F192.168.1.102%2Forg.yf.service.PersonService%3Fapplication%3Duser-consumer%26category%3Dconsumers%26check%3Dfalse%26dubbo%3D2.5.8%26interface%3Dorg.yf.service.PersonService%26methods%3DgetPerson%2CselectPersonById%26pid%3D2544%26side%3Dconsumer%26timestamp%3D1517241861616]
cZxid = 0x200000008
ctime = Mon Jan 29 08:04:32 PST 2018
mZxid = 0x200000008
mtime = Mon Jan 29 08:04:32 PST 2018
pZxid = 0x200000009
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
[zk: localhost:2181(CONNECTED) 9] ls2 /dubbo/org.yf.service.PersonService/providers
[dubbo%3A%2F%2F192.168.1.102%3A20880%2Forg.yf.service.PersonService%3Fanyhost%3Dtrue%26application%3Dorders-provider%26dubbo%3D2.5.8%26generic%3Dfalse%26interface%3Dorg.yf.service.PersonService%26methods%3DgetPerson%2CselectPersonById%26pid%3D1748%26side%3Dprovider%26timestamp%3D1517241822844]
cZxid = 0x200000004
ctime = Mon Jan 29 08:04:10 PST 2018
mZxid = 0x200000004
mtime = Mon Jan 29 08:04:10 PST 2018
pZxid = 0x200000005
cversion = 1
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 1
更多推荐
已为社区贡献2条内容
所有评论(0)