zk 删除非空节点

Connecting to localhost:2181
2016-09-09 15:29:06,788 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:
09 GMT
2016-09-09 15:29:06,793 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=10.1.39.11
2016-09-09 15:29:06,794 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_92
2016-09-09 15:29:06,798 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2016-09-09 15:29:06,799 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=C:\Program Files\Java\jre1.8.0_92
2016-09-09 15:29:06,799 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=E:\work_new\wk_as\zookeeper-3.4.6\bin\..
\build\classes;E:\work_new\wk_as\zookeeper-3.4.6\bin\..\build\lib\*;E:\work_new\wk_as\zookeeper-3.4.6\bin\..\zookeeper-3.4.6.jar;E:\work_new
\wk_as\zookeeper-3.4.6\bin\..\lib\jline-0.9.94.jar;E:\work_new\wk_as\zookeeper-3.4.6\bin\..\lib\log4j-1.2.16.jar;E:\work_new\wk_as\zookeeper
-3.4.6\bin\..\lib\netty-3.7.0.Final.jar;E:\work_new\wk_as\zookeeper-3.4.6\bin\..\lib\slf4j-api-1.6.1.jar;E:\work_new\wk_as\zookeeper-3.4.6\b
in\..\lib\slf4j-log4j12-1.6.1.jar;E:\work_new\wk_as\zookeeper-3.4.6\bin\..\conf
2016-09-09 15:29:06,800 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=C:\ProgramData\Oracle\Java\javapath;C:
\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Python27\;C:\Python27\Scripts;C:\ProgramData\Oracle\Java\javapath;C:\oracle\product\
10.2.0\db_2\bin;C:\oracle\product\10.2.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerSh
ell\v1.0\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Java\jdk1.7.0_79\\bin;C:\Program Files\Java\jdk1.7.0_79\\jre\bin;H:\w
ork\apache-maven-3.3.9\bin;C:\Python34;C:\Program Files\VisualSVN Server\bin;D:\Program Files\oracle\instantclient-basic-nt-12.1.0.2.0\insta
ntclient_12_1;C:\Program Files\VanDyke Software\Clients\;C:\Program Files (x86)\scala\bin;C:\Python27;C:\Python27\Scripts;H:\Program Files\T
ortoiseSVN\bin;E:\work_new\wk_as\zookeeper-3.4.6;E:\work_new\wk_as\gradle-3.0\bin;.
2016-09-09 15:29:06,801 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=C:\Users\ADMINI~1.USE\AppData\Local\Temp\

2016-09-09 15:29:06,801 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2016-09-09 15:29:06,802 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Windows 7
2016-09-09 15:29:06,802 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2016-09-09 15:29:06,802 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=6.1
2016-09-09 15:29:06,803 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=Administrator
2016-09-09 15:29:06,804 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=C:\Users\Administrator.USER-20160227BV
2016-09-09 15:29:06,805 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=E:\work_new\wk_as\zookeeper-3.4.6\bin
2016-09-09 15:29:06,808 [myid:] - INFO  [main:ZooKeeper@438] - Initiating client connection, connectString=localhost:2181 sessionTimeout=300
00 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@277050dc
Welcome to ZooKeeper!
2016-09-09 15:29:06,988 [myid:] - INFO  [main-SendThread(0:0:0:0:0:0:0:1:2181):ClientCnxn$SendThread@975] - Opening socket connection to ser
ver 0:0:0:0:0:0:0:1/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
2016-09-09 15:29:06,993 [myid:] - INFO  [main-SendThread(0:0:0:0:0:0:0:1:2181):ClientCnxn$SendThread@852] - Socket connection established to
 0:0:0:0:0:0:0:1/0:0:0:0:0:0:0:1:2181, initiating session
JLine support is enabled
[zk: localhost:2181(CONNECTING) 0] 2016-09-09 15:29:07,441 [myid:] - INFO  [main-SendThread(0:0:0:0:0:0:0:1:2181):ClientCnxn$SendThread@1235
] - Session establishment complete on server 0:0:0:0:0:0:0:1/0:0:0:0:0:0:0:1:2181, sessionid = 0x1570dd8269f0000, negotiated timeout = 30000


WATCHER::

WatchedEvent state:SyncConnected type:None path:null
ls /
[dubbo, zookeeper]
[zk: localhost:2181(CONNECTED) 1] delete  /dubbo
Node not empty: /dubbo
[zk: localhost:2181(CONNECTED) 2] ls /
[dubbo, zookeeper]
[zk: localhost:2181(CONNECTED) 3] ls /dubbo/
Command failed: java.lang.IllegalArgumentException: Path must not end with / character
[zk: localhost:2181(CONNECTED) 4] ls /dubbo
[com.alibaba.dubbo.monitor.MonitorService, yjmyzz.dubbo.demo.api.UserService]
[zk: localhost:2181(CONNECTED) 5] get /dubbo
null
cZxid = 0x4
ctime = Tue Sep 06 17:07:58 CST 2016
mZxid = 0x4
mtime = Tue Sep 06 17:07:58 CST 2016
pZxid = 0x76
cversion = 2
dataVersion = 0
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 0
numChildren = 2
[zk: localhost:2181(CONNECTED) 6] delete /dubbo/com.alibaba.dubbo.monitor.MonitorService
Node not empty: /dubbo/com.alibaba.dubbo.monitor.MonitorService
[zk: localhost:2181(CONNECTED) 7] ls /dubbo/com.alibaba.dubbo.monitor.MonitorService
[consumers, configurators, routers, providers]
[zk: localhost:2181(CONNECTED) 8] rmr /dubbo/com.alibaba.dubbo.monitor.MonitorService
[zk: localhost:2181(CONNECTED) 9] ls /dubbo/com.alibaba.dubbo.monitor.MonitorService
Node does not exist: /dubbo/com.alibaba.dubbo.monitor.MonitorService
[zk: localhost:2181(CONNECTED) 10] ls /dubbo
[yjmyzz.dubbo.demo.api.UserService]
[zk: localhost:2181(CONNECTED) 11] rmr /dubbo/yjmyzz.dubbo.demo.api.UserService
[zk: localhost:2181(CONNECTED) 12] ls /dubbo
[]
[zk: localhost:2181(CONNECTED) 13] ls /
[dubbo, zookeeper]
[zk: localhost:2181(CONNECTED) 14] delete  /dubbo
[zk: localhost:2181(CONNECTED) 15]
[zk: localhost:2181(CONNECTED) 15]
[zk: localhost:2181(CONNECTED) 15]

©️2020 CSDN 皮肤主题: 大白 设计师: CSDN官方博客 返回首页
实付0元
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值