com.101tec
zkclient
0.11
参与选举的主机信息对象
public class ServerDataBean implements Serializable {
private static final long serialVersionUID = -6055525987498064722L;
// 服务器id
private long cid;
// 服务器名称
private String name;
public long getCid() {
return cid;
}
public void setCid(long cid) {
this.cid = cid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String toString() {
return "RunningData [cid=" + cid + ", name=" + name + "]";
}
}
选举调用对象LeaderSelectorZkClient
public class LeaderSelectorZkClient {
private static final Logger logger = LoggerFactory.getLogger(LeaderSelectorZkClient.class);
// 启动的竞争个数
private static final int COUNT_CLIENT = 3;
public static void main(String[] args) throws Exception {
// 保存所有服务的列表
List<WorkServer> workServers = new ArrayList<WorkServer>();
CountDownLatch countDownLatch = new CountDownLatch(COUNT_CLIENT);
try {
for (int i = 0; i < COUNT_CLIENT; ++i) {
new Thread(() -> {
int id = new Random().nextInt(10000);
logger.debug("{},创建编号为:{}", Thread.currentThread().getName(), id);
ServerDataBean runningData = new ServerDataBean();
runningData.setCid(id);
runningData.setName("Client #" + id);
// 创建服务
WorkServer workServer = new WorkServer(runningData);
workServers.add(workServer);
// 大家公平竞争
try {
countDownLatch.countDown();
countDownLatch.await();
logger.debug("{},编号为:{}, 开始选举", Thread.currentThread().getName(), id);
workServer.start();
} catch (Exception e) {
e.printStackTrace();
}
}).start();
}
TimeUnit.SECONDS.sleep(20);
} finally {
logger.debug("停止选举...");
for (WorkServer workServer : workServers) {
try {
workServer.stop();
} catch (Exception e) {
e.printStackTrace();
}
}
}
}
}
选举过程实现
public class WorkServer implements IZkDataListener {
// 客户端状态
private volatile boolean running = false;
// zk master节点
public static final String MASTER_PATH = "/master";
// 服务器基本信息
private ServerDataBean serverData;
// 主节点基本信息
private ServerDataBean masterData;
// 任务调度管理
private ScheduledExecutorService delaySchedule = Executors.newScheduledThreadPool(2);
private static final String CONNECT_IP_PORT = "176.16.0.135:2181";
private ZkClient zkClient;
private static final Logger logger = LoggerFactory.getLogger(WorkServer.class);
public WorkServer(ServerDataBean runningData) {
this.serverData = runningData;
this.zkClient = new ZkClient(CONNECT_IP_PORT, 5000, 5000, new SerializableSerializer());
}
// 启动
public void start() throws Exception {
if (running) {
throw new Exception("server has startup....");
}
running = true;
zkClient.subscribeDataChanges(MASTER_PATH, this);
logger.debug("{}, 服务器:{},对节点{},注册监听", Thread.currentThread().getName(), serverData, MASTER_PATH);
chooseMaster();
}
// 释放
public void stop() throws Exception {
if (!running) {
throw new Exception("停止服务...");
}
running = false;
delaySchedule.shutdown();
zkClient.unsubscribeDataChanges(MASTER_PATH, this);
releaseMaster();
}
@Override
public void handleDataChange(String dataPath, Object data) throws Exception {
}
@Override
public void handleDataDeleted(String dataPath) throws Exception {
logger.debug("{}, 服务器:{}, master需要重新竞争,handleDataDeleted方法触发...", Thread.currentThread().getName(), serverData);
if (masterData != null && masterData.getName().equals(serverData.getName())) {
logger.debug("{}, 服务器:{}, 当前竞争者为上一个master,优先开启竞争", Thread.currentThread().getName(), serverData);
chooseMaster();
} else {
delaySchedule.schedule(() -> {
logger.debug("{}, 服务器:{}, 当前竞争者为一个普通竞争者,延迟5秒后开始竞争", Thread.currentThread().getName(), serverData);
chooseMaster();
}, 5L, TimeUnit.SECONDS);
}
}
private boolean isMaster() {
try {
ServerDataBean runningData = zkClient.readData(MASTER_PATH);
if (serverData.getName().equals(runningData.getName())) {
return true;
}
} catch (Exception e) {
return false;
}
return false;
}
// 选择master
private void chooseMaster() {
if (!running) {
return;
}
logger.debug("{}, 服务器:{}, 参与竞争节点{}, 竞选master", Thread.currentThread().getName(), serverData, MASTER_PATH);
try {
zkClient.createEphemeral(MASTER_PATH, serverData);
masterData = serverData;
logger.debug("{}, 服务器:{}, 参与竞争节点{}, 竞选master,竞选成功", Thread.currentThread().getName(), serverData,
MASTER_PATH);
delaySchedule.scheduleAtFixedRate(() -> {
if (isMaster()) {
logger.debug("{}, 服务器:{}, 开始释放节点,每10秒释放一次", Thread.currentThread().getName(), serverData,
MASTER_PATH);
releaseMaster();
}
}, 0L, 10L, TimeUnit.SECONDS);
} catch (Exception e) {
logger.debug("{}, 服务器:{}, 参与竞争节点{}, 竞选失败...", Thread.currentThread().getName(), serverData, MASTER_PATH);
ServerDataBean runningData = zkClient.readData(MASTER_PATH, true);
if (runningData == null) {
logger.debug("重试机制竞争...");
chooseMaster();
} else {
masterData = runningData;
}
}
}
private void releaseMaster() {
if (isMaster()) {
zkClient.delete(MASTER_PATH);
}
}
}
分析一下执行过程就明白了,这里日志打印很详细
2019-1-22 11:39:52[DEBUG](LeaderSelectorZkClient.java:26) Thread-1,创建编号为:5792
2019-1-22 11:39:52[DEBUG](LeaderSelectorZkClient.java:26) Thread-0,创建编号为:459
2019-1-22 11:39:52[DEBUG](LeaderSelectorZkClient.java:26) Thread-2,创建编号为:9859
2019-1-22 11:39:52[DEBUG](ZkConnection.java:69) Creating new ZookKeeper instance to connect to 176.16.0.135:2181.
2019-1-22 11:39:52[ INFO](ZkEventThread.java:65) Starting ZkClient event thread.
2019-1-22 11:39:52[ INFO](ZkEventThread.java:65) Starting ZkClient event thread.
2019-1-22 11:39:52[ INFO](ZkEventThread.java:65) Starting ZkClient event thread.
2019-1-22 11:39:52[DEBUG](ZkConnection.java:69) Creating new ZookKeeper instance to connect to 176.16.0.135:2181.
2019-1-22 11:39:52[DEBUG](ZkConnection.java:69) Creating new ZookKeeper instance to connect to 176.16.0.135:2181.
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:host.name=momo
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:java.version=1.8.0_131
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:java.vendor=Oracle Corporation
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:java.home=C:\Program Files\Java\jre1.8.0_131
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:java.class.path=C:\TempData\my-workspace\zookeeperuse\target\classes;C:\TempData\maven-workspace\org\apache\zookeeper\zookeeper\3.4.13\zookeeper-3.4.13.jar;C:\TempData\maven-workspace\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\TempData\maven-workspace\org\slf4j\slf4j-log4j12\1.7.25\slf4j-log4j12-1.7.25.jar;C:\TempData\maven-workspace\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\TempData\maven-workspace\jline\jline\0.9.94\jline-0.9.94.jar;C:\TempData\maven-workspace\org\apache\yetus\audience-annotations\0.5.0\audience-annotations-0.5.0.jar;C:\TempData\maven-workspace\io\netty\netty\3.10.6.Final\netty-3.10.6.Final.jar;C:\TempData\maven-workspace\com\101tec\zkclient\0.11\zkclient-0.11.jar;C:\TempData\maven-workspace\org\apache\curator\curator-framework\4.1.0\curator-framework-4.1.0.jar;C:\TempData\maven-workspace\org\apache\curator\curator-client\4.1.0\curator-client-4.1.0.jar;C:\TempData\maven-workspace\com\google\guava\guava\20.0\guava-20.0.jar;C:\TempData\maven-workspace\org\apache\curator\curator-recipes\4.1.0\curator-recipes-4.1.0.jar
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:java.library.path=C:\Program Files\Java\jre1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;C:\tools\apache-maven-3.5.4\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\lib;C:\Program Files\Java\jdk1.8.0_131\lib\tools.jar;C:\tools\apache-maven-3.5.4\bin\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\Git\cmd;C:\Program Files\Java\jre1.8.0_131\lib;C:\Program Files\Java\jre1.8.0_131\bin;C:\tools\apache-tomcat-6.0.48\bin;;C:\Program Files (x86)\OpenGrADS\Contents\Cygwin\Versions2.0.a9.oga.1\i686;C:\Users\it\AppData\Local\Microsoft\WindowsApps;C:\tools\eclipse-64;;.
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:java.io.tmpdir=C:\Users\it\AppData\Local\Temp\
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:java.compiler=
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:os.name=Windows 10
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:os.arch=amd64
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:os.version=10.0
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:user.name=it
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:user.home=C:\Users\it
2019-1-22 11:39:57[ INFO](Environment.java:100) Client environment:user.dir=C:\TempData\my-workspace\zookeeperuse
2019-1-22 11:39:57[ INFO](ZooKeeper.java:442) Initiating client connection, connectString=176.16.0.135:2181 sessionTimeout=5000 watcher=org.I0Itec.zkclient.ZkClient@61f234f7
2019-1-22 11:39:57[ INFO](ZooKeeper.java:442) Initiating client connection, connectString=176.16.0.135:2181 sessionTimeout=5000 watcher=org.I0Itec.zkclient.ZkClient@719eda74
2019-1-22 11:39:57[ INFO](ZooKeeper.java:442) Initiating client connection, connectString=176.16.0.135:2181 sessionTimeout=5000 watcher=org.I0Itec.zkclient.ZkClient@38331f0
2019-1-22 11:39:57[DEBUG](ClientCnxn.java:120) zookeeper.disableAutoWatchReset is false
2019-1-22 11:39:57[DEBUG](ZkClient.java:1230) Awaiting connection to Zookeeper server
2019-1-22 11:39:57[ INFO](ZkClient.java:936) Waiting for keeper state SyncConnected
2019-1-22 11:39:57[DEBUG](ZkClient.java:1230) Awaiting connection to Zookeeper server
2019-1-22 11:39:57[ INFO](ZkClient.java:936) Waiting for keeper state SyncConnected
2019-1-22 11:39:57[DEBUG](ZkClient.java:1230) Awaiting connection to Zookeeper server
2019-1-22 11:39:57[ INFO](ZkClient.java:936) Waiting for keeper state SyncConnected
2019-1-22 11:40:02[ INFO](ClientCnxn.java:1029) Opening socket connection to server 176.16.0.135/176.16.0.135:2181. Will not attempt to authenticate using SASL (unknown error)
2019-1-22 11:40:02[ INFO](ClientCnxn.java:1029) Opening socket connection to server 176.16.0.135/176.16.0.135:2181. Will not attempt to authenticate using SASL (unknown error)
2019-1-22 11:40:02[ INFO](ClientCnxn.java:1029) Opening socket connection to server 176.16.0.135/176.16.0.135:2181. Will not attempt to authenticate using SASL (unknown error)
2019-1-22 11:40:02[ INFO](ClientCnxn.java:879) Socket connection established to 176.16.0.135/176.16.0.135:2181, initiating session
2019-1-22 11:40:02[ INFO](ClientCnxn.java:879) Socket connection established to 176.16.0.135/176.16.0.135:2181, initiating session
2019-1-22 11:40:02[ INFO](ClientCnxn.java:879) Socket connection established to 176.16.0.135/176.16.0.135:2181, initiating session
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:952) Session establishment request sent on 176.16.0.135/176.16.0.135:2181
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:952) Session establishment request sent on 176.16.0.135/176.16.0.135:2181
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:952) Session establishment request sent on 176.16.0.135/176.16.0.135:2181
2019-1-22 11:40:02[ INFO](ClientCnxn.java:1303) Session establishment complete on server 176.16.0.135/176.16.0.135:2181, sessionid = 0x1000001a10c0011, negotiated timeout = 5000
2019-1-22 11:40:02[ INFO](ClientCnxn.java:1303) Session establishment complete on server 176.16.0.135/176.16.0.135:2181, sessionid = 0x1000001a10c0010, negotiated timeout = 5000
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:None path:null
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:None path:null
2019-1-22 11:40:02[ INFO](ZkClient.java:713) zookeeper state changed (SyncConnected)
2019-1-22 11:40:02[ INFO](ZkClient.java:713) zookeeper state changed (SyncConnected)
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkClient.java:950) State is SyncConnected
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[ INFO](ClientCnxn.java:1303) Session establishment complete on server 176.16.0.135/176.16.0.135:2181, sessionid = 0x1000001a10c0012, negotiated timeout = 5000
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:None path:null
2019-1-22 11:40:02[DEBUG](ZkClient.java:950) State is SyncConnected
2019-1-22 11:40:02[ INFO](ZkClient.java:713) zookeeper state changed (SyncConnected)
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkClient.java:950) State is SyncConnected
2019-1-22 11:40:02[DEBUG](LeaderSelectorZkClient.java:38) Thread-2,编号为:9859, 开始选举
2019-1-22 11:40:02[DEBUG](LeaderSelectorZkClient.java:38) Thread-0,编号为:459, 开始选举
2019-1-22 11:40:02[DEBUG](LeaderSelectorZkClient.java:38) Thread-1,编号为:5792, 开始选举
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 1,3 replyHeader:: 1,28942,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 1,3 replyHeader:: 1,28942,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 1,3 replyHeader:: 1,28942,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ZkClient.java:196) Subscribed data changes for /master
2019-1-22 11:40:02[DEBUG](WorkServer.java:42) Thread-2, 服务器:RunningData [cid=9859, name=Client #9859],对节点/master,注册监听
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) Thread-2, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ZkClient.java:196) Subscribed data changes for /master
2019-1-22 11:40:02[DEBUG](WorkServer.java:42) Thread-1, 服务器:RunningData [cid=5792, name=Client #5792],对节点/master,注册监听
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) Thread-1, 服务器:RunningData [cid=5792, name=Client #5792], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ZkClient.java:196) Subscribed data changes for /master
2019-1-22 11:40:02[DEBUG](WorkServer.java:42) Thread-0, 服务器:RunningData [cid=459, name=Client #459],对节点/master,注册监听
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) Thread-0, 服务器:RunningData [cid=459, name=Client #459], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 2,1 replyHeader:: 2,28943,0 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,v{s{31,s{'world,'anyone}}},1 response:: '/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 2,1 replyHeader:: 2,28944,-110 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b78700000001ffffffcb740b436c69656e742023343539,v{s{31,s{'world,'anyone}}},1 response::
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](WorkServer.java:99) Thread-2, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master,竞选成功
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #1 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #2 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #3 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 2,1 replyHeader:: 2,28945,-110 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000016ffffffa0740c436c69656e74202335373932,v{s{31,s{'world,'anyone}}},1 response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 3,3 replyHeader:: 3,28945,0 request:: '/master,T response:: s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 3,3 replyHeader:: 3,28945,0 request:: '/master,T response:: s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 3,3 replyHeader:: 3,28945,0 request:: '/master,T response:: s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 4,4 replyHeader:: 4,28945,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](WorkServer.java:109) Thread-0, 服务器:RunningData [cid=459, name=Client #459], 参与竞争节点/master, 竞选失败...
2019-1-22 11:40:02[DEBUG](WorkServer.java:109) Thread-1, 服务器:RunningData [cid=5792, name=Client #5792], 参与竞争节点/master, 竞选失败...
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 4,4 replyHeader:: 4,28945,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 4,4 replyHeader:: 4,28945,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 5,4 replyHeader:: 5,28945,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #2 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #3 done
2019-1-22 11:40:02[DEBUG](WorkServer.java:103) pool-2-thread-1, 服务器:RunningData [cid=9859, name=Client #9859], 开始释放节点,每10秒释放一次
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #1 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 5,4 replyHeader:: 5,28945,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 5,4 replyHeader:: 5,28945,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 6,4 replyHeader:: 6,28945,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28943,28943,1548128401674,1548128401674,0,0,0,72057601034813458,128,0,28943}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #4 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 7,2 replyHeader:: 7,28946,0 request:: '/master,-1 response:: null
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #5 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #6 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 6,3 replyHeader:: 6,28946,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 8,3 replyHeader:: 8,28946,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 7,4 replyHeader:: 7,28946,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-15-176.16.0.135:2181, 服务器:RunningData [cid=5792, name=Client #5792], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 6,3 replyHeader:: 6,28946,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #4 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 9,4 replyHeader:: 9,28946,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](WorkServer.java:66) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 当前竞争者为上一个master,优先开启竞争
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 7,4 replyHeader:: 7,28946,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-13-176.16.0.135:2181, 服务器:RunningData [cid=459, name=Client #459], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #6 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #7 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #8 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 10,1 replyHeader:: 10,28947,0 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,v{s{31,s{'world,'anyone}}},1 response:: '/master
2019-1-22 11:40:02[DEBUG](WorkServer.java:99) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master,竞选成功
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #5 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #9 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 8,3 replyHeader:: 8,28947,0 request:: '/master,T response:: s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 11,3 replyHeader:: 11,28947,0 request:: '/master,T response:: s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 8,3 replyHeader:: 8,28947,0 request:: '/master,T response:: s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 12,4 replyHeader:: 12,28947,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](WorkServer.java:103) pool-2-thread-1, 服务器:RunningData [cid=9859, name=Client #9859], 开始释放节点,每10秒释放一次
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 9,4 replyHeader:: 9,28947,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 13,4 replyHeader:: 13,28947,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 9,4 replyHeader:: 9,28947,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #9 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #8 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #7 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 14,4 replyHeader:: 14,28947,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28947,28947,1548128401746,1548128401746,0,0,0,72057601034813458,128,0,28947}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #10 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #11 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 15,2 replyHeader:: 15,28948,0 request:: '/master,-1 response:: null
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 10,3 replyHeader:: 10,28948,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #12 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 10,3 replyHeader:: 10,28948,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 11,4 replyHeader:: 11,28948,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 16,3 replyHeader:: 16,28948,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-15-176.16.0.135:2181, 服务器:RunningData [cid=5792, name=Client #5792], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #10 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 11,4 replyHeader:: 11,28948,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-13-176.16.0.135:2181, 服务器:RunningData [cid=459, name=Client #459], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #11 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 17,4 replyHeader:: 17,28948,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](WorkServer.java:66) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 当前竞争者为上一个master,优先开启竞争
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #13 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #14 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 18,1 replyHeader:: 18,28949,0 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,v{s{31,s{'world,'anyone}}},1 response:: '/master
2019-1-22 11:40:02[DEBUG](WorkServer.java:99) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master,竞选成功
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #12 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #15 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 12,3 replyHeader:: 12,28949,0 request:: '/master,T response:: s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 12,3 replyHeader:: 12,28949,0 request:: '/master,T response:: s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 13,4 replyHeader:: 13,28949,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #13 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 19,3 replyHeader:: 19,28949,0 request:: '/master,T response:: s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 20,4 replyHeader:: 20,28949,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](WorkServer.java:103) pool-2-thread-2, 服务器:RunningData [cid=9859, name=Client #9859], 开始释放节点,每10秒释放一次
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 13,4 replyHeader:: 13,28949,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #14 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 21,4 replyHeader:: 21,28949,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #15 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 22,4 replyHeader:: 22,28949,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28949,28949,1548128401797,1548128401797,0,0,0,72057601034813458,128,0,28949}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 23,2 replyHeader:: 23,28950,0 request:: '/master,-1 response:: null
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #16 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #17 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #18 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 14,3 replyHeader:: 14,28950,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 24,3 replyHeader:: 24,28950,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 15,4 replyHeader:: 15,28950,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-15-176.16.0.135:2181, 服务器:RunningData [cid=5792, name=Client #5792], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #16 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 25,4 replyHeader:: 25,28950,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](WorkServer.java:66) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 当前竞争者为上一个master,优先开启竞争
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 14,3 replyHeader:: 14,28950,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 15,4 replyHeader:: 15,28950,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-13-176.16.0.135:2181, 服务器:RunningData [cid=459, name=Client #459], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #18 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #19 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #20 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 26,1 replyHeader:: 26,28951,0 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,v{s{31,s{'world,'anyone}}},1 response:: '/master
2019-1-22 11:40:02[DEBUG](WorkServer.java:99) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master,竞选成功
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #17 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #21 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 16,3 replyHeader:: 16,28951,0 request:: '/master,T response:: s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 27,4 replyHeader:: 27,28951,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 16,3 replyHeader:: 16,28951,0 request:: '/master,T response:: s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](WorkServer.java:103) pool-2-thread-1, 服务器:RunningData [cid=9859, name=Client #9859], 开始释放节点,每10秒释放一次
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 28,3 replyHeader:: 28,28951,0 request:: '/master,T response:: s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 17,4 replyHeader:: 17,28951,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #19 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 17,4 replyHeader:: 17,28951,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #20 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 29,4 replyHeader:: 29,28951,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 30,4 replyHeader:: 30,28951,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28951,28951,1548128401837,1548128401837,0,0,0,72057601034813458,128,0,28951}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #21 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #22 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #23 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #24 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 31,2 replyHeader:: 31,28952,0 request:: '/master,-1 response:: null
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 18,3 replyHeader:: 18,28952,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 32,3 replyHeader:: 32,28952,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 18,3 replyHeader:: 18,28952,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 19,4 replyHeader:: 19,28952,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 33,4 replyHeader:: 33,28952,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-15-176.16.0.135:2181, 服务器:RunningData [cid=5792, name=Client #5792], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #22 done
2019-1-22 11:40:02[DEBUG](WorkServer.java:66) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 当前竞争者为上一个master,优先开启竞争
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 19,4 replyHeader:: 19,28952,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-13-176.16.0.135:2181, 服务器:RunningData [cid=459, name=Client #459], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #23 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #26 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #25 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 34,1 replyHeader:: 34,28953,0 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,v{s{31,s{'world,'anyone}}},1 response:: '/master
2019-1-22 11:40:02[DEBUG](WorkServer.java:99) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master,竞选成功
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #24 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #27 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 35,4 replyHeader:: 35,28953,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](WorkServer.java:103) pool-2-thread-2, 服务器:RunningData [cid=9859, name=Client #9859], 开始释放节点,每10秒释放一次
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 36,3 replyHeader:: 36,28953,0 request:: '/master,T response:: s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 20,3 replyHeader:: 20,28953,0 request:: '/master,T response:: s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 20,3 replyHeader:: 20,28953,0 request:: '/master,T response:: s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 37,4 replyHeader:: 37,28953,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 21,4 replyHeader:: 21,28953,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #26 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 21,4 replyHeader:: 21,28953,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #25 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 38,4 replyHeader:: 38,28953,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28953,28953,1548128401887,1548128401887,0,0,0,72057601034813458,128,0,28953}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #27 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #28 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #29 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 39,2 replyHeader:: 39,28954,0 request:: '/master,-1 response:: null
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #30 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 22,3 replyHeader:: 22,28954,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 40,3 replyHeader:: 40,28954,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 22,3 replyHeader:: 22,28954,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 23,4 replyHeader:: 23,28954,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-13-176.16.0.135:2181, 服务器:RunningData [cid=459, name=Client #459], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #28 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 41,4 replyHeader:: 41,28954,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](WorkServer.java:66) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 当前竞争者为上一个master,优先开启竞争
2019-1-22 11:40:02[DEBUG](WorkServer.java:95) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 23,4 replyHeader:: 23,28954,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-15-176.16.0.135:2181, 服务器:RunningData [cid=5792, name=Client #5792], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #29 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #31 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeCreated path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeCreated path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #32 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 42,1 replyHeader:: 42,28955,0 request:: '/master,#ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,v{s{31,s{'world,'anyone}}},1 response:: '/master
2019-1-22 11:40:02[DEBUG](WorkServer.java:99) ZkClient-EventThread-14-176.16.0.135:2181, 服务器:RunningData [cid=9859, name=Client #9859], 参与竞争节点/master, 竞选master,竞选成功
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #30 done
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #33 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 24,3 replyHeader:: 24,28955,0 request:: '/master,T response:: s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 24,3 replyHeader:: 24,28955,0 request:: '/master,T response:: s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 43,4 replyHeader:: 43,28955,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](WorkServer.java:103) pool-2-thread-1, 服务器:RunningData [cid=9859, name=Client #9859], 开始释放节点,每10秒释放一次
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 25,4 replyHeader:: 25,28955,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 44,3 replyHeader:: 44,28955,0 request:: '/master,T response:: s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #31 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 25,4 replyHeader:: 25,28955,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #32 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 45,4 replyHeader:: 45,28955,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 46,4 replyHeader:: 46,28955,0 request:: '/master,T response:: #ffffffacffffffed057372032707269762e64656e676a6c2e7a6f6f6b65657065727573652e6170702e6d61737465722e536572766572446174614265616effffffabfffffff67332ffffffab84ffffffae2024a036369644c046e616d65740124c6a6176612f6c616e672f537472696e673b787000000026ffffff83740c436c69656e74202339383539,s{28955,28955,1548128401960,1548128401960,0,0,0,72057601034813458,128,0,28955}
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #33 done
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0010
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0011
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:769) Got notification sessionid:0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:791) Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master for sessionid 0x1000001a10c0012
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #34 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@36269e7b]
2019-1-22 11:40:02[DEBUG](ZkClient.java:615) Received event: WatchedEvent state:SyncConnected type:NodeDeleted path:/master
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:89) New event: ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ZkClient.java:659) Leaving process event
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #35 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@df63605]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 47,2 replyHeader:: 47,28956,0 request:: '/master,-1 response:: null
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:70) Delivering event #36 ZkEvent[Data of /master changed sent to priv.dengjl.zookeeperuse.app.master.WorkServer@1230d722]
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 26,3 replyHeader:: 26,28956,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0010, packet:: clientPath:null serverPath:null finished:false header:: 26,3 replyHeader:: 26,28956,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0012, packet:: clientPath:null serverPath:null finished:false header:: 48,3 replyHeader:: 48,28956,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](ClientCnxn.java:846) Reading reply sessionid:0x1000001a10c0011, packet:: clientPath:null serverPath:null finished:false header:: 27,4 replyHeader:: 27,28956,-101 request:: '/master,T response::
2019-1-22 11:40:02[DEBUG](WorkServer.java:64) ZkClient-EventThread-13-176.16.0.135:2181, 服务器:RunningData [cid=459, name=Client #459], master需要重新竞争,handleDataDeleted方法触发...
2019-1-22 11:40:02[DEBUG](ZkEventThread.java:80) Delivering event #35 done
org.apache.curator
curator-framework
4.1.0
org.apache.curator
curator-recipes
4.1.0
public class LeaderSelectorExample {
// 启动的竞争个数
private static final int COUNT_CLIENT = 3;
private static final Logger logger = LoggerFactory.getLogger(LeaderSelectorZkClient.class);
private static final String CONNECT_IP_PORT = "176.16.0.135:2181";
private static final String PATH = "/master";
public static void main(String[] args) throws Exception {
CuratorFramework client = CuratorFrameworkFactory.builder().connectString(CONNECT_IP_PORT)
.sessionTimeoutMs(5000).connectionTimeoutMs(5000).retryPolicy(new ExponentialBackoffRetry(1000, 3))
.build();
client.start();
logger.debug("创建连接成功:{}", client);
for (int i = 1; i <= COUNT_CLIENT; i++) {
final int index = i;
new Thread(()->{
LeaderSelector leaderSelector = new LeaderSelector(client, PATH, new LeaderSelectorListenerAdapter() {
@Override
public void takeLeadership(CuratorFramework client) throws Exception {
logger.debug("选举master成功, 当前client:leaderSelector{}", index);
TimeUnit.SECONDS.sleep(2);
}
});
leaderSelector.autoRequeue();
leaderSelector.start();
}).start();
}
System.in.read();
}
}
测试结果
Running in ZooKeeper 3.4.x compatibility mode
Starting
Starting
Starting
reset
Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 00:39 GMT
Client environment:host.name=momo
Client environment:java.version=1.8.0_131
Client environment:java.vendor=Oracle Corporation
Client environment:java.home=C:\Program Files\Java\jre1.8.0_131
Client environment:java.class.path=C:\TempData\my-workspace\zookeeperuse\target\classes;C:\TempData\maven-workspace\org\apache\zookeeper\zookeeper\3.4.13\zookeeper-3.4.13.jar;C:\TempData\maven-workspace\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\TempData\maven-workspace\org\slf4j\slf4j-log4j12\1.7.25\slf4j-log4j12-1.7.25.jar;C:\TempData\maven-workspace\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\TempData\maven-workspace\jline\jline\0.9.94\jline-0.9.94.jar;C:\TempData\maven-workspace\org\apache\yetus\audience-annotations\0.5.0\audience-annotations-0.5.0.jar;C:\TempData\maven-workspace\io\netty\netty\3.10.6.Final\netty-3.10.6.Final.jar;C:\TempData\maven-workspace\com\101tec\zkclient\0.11\zkclient-0.11.jar;C:\TempData\maven-workspace\org\apache\curator\curator-framework\4.1.0\curator-framework-4.1.0.jar;C:\TempData\maven-workspace\org\apache\curator\curator-client\4.1.0\curator-client-4.1.0.jar;C:\TempData\maven-workspace\com\google\guava\guava\20.0\guava-20.0.jar;C:\TempData\maven-workspace\org\apache\curator\curator-recipes\4.1.0\curator-recipes-4.1.0.jar
Client environment:java.library.path=C:\Program Files\Java\jre1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;C:\tools\apache-maven-3.5.4\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\lib;C:\Program Files\Java\jdk1.8.0_131\lib\tools.jar;C:\tools\apache-maven-3.5.4\bin\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\Git\cmd;C:\Program Files\Java\jre1.8.0_131\lib;C:\Program Files\Java\jre1.8.0_131\bin;C:\tools\apache-tomcat-6.0.48\bin;;C:\Program Files (x86)\OpenGrADS\Contents\Cygwin\Versions2.0.a9.oga.1\i686;C:\Users\it\AppData\Local\Microsoft\WindowsApps;C:\tools\eclipse-64;;.
Client environment:java.io.tmpdir=C:\Users\it\AppData\Local\Temp\
Client environment:java.compiler=
Client environment:os.name=Windows 10
Client environment:os.arch=amd64
Client environment:os.version=10.0
Client environment:user.name=it
Client environment:user.home=C:\Users\it
Client environment:user.dir=C:\TempData\my-workspace\zookeeperuse
Initiating client connection, connectString=176.16.0.135:2181 sessionTimeout=5000 watcher=org.apache.curator.ConnectionState@7f690630
zookeeper.disableAutoWatchReset is false
Default schema
创建连接成功:org.apache.curator.framework.imps.CuratorFrameworkImpl@77caeb3e
Opening socket connection to server 176.16.0.135/176.16.0.135:2181. Will not attempt to authenticate using SASL (unknown error)
Socket connection established to 176.16.0.135/176.16.0.135:2181, initiating session
Session establishment request sent on 176.16.0.135/176.16.0.135:2181
Session establishment complete on server 176.16.0.135/176.16.0.135:2181, sessionid = 0x1000001a10c0013, negotiated timeout = 5000
Negotiated session timeout: 5000
State change: CONNECTED
Clearing sleep for 0 operations
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 1,1 replyHeader:: 1,29144,-101 request:: '/master/_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response::
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 2,1 replyHeader:: 2,29145,-101 request:: '/master/_c_5be22a54-7d14-43df-851e-c89768566690-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response::
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 3,1 replyHeader:: 3,29146,-101 request:: '/master/_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response::
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 4,3 replyHeader:: 4,29146,-101 request:: '/master,F response::
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 5,3 replyHeader:: 5,29146,-101 request:: '/master,F response::
The version of ZooKeeper being used doesn't support Container nodes. CreateMode.PERSISTENT will be used instead.
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 6,3 replyHeader:: 6,29146,-101 request:: '/master,F response::
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 7,1 replyHeader:: 7,29147,0 request:: '/master,,v{s{31,s{'world,'anyone}}},0 response:: '/master
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 8,1 replyHeader:: 8,29148,-110 request:: '/master,,v{s{31,s{'world,'anyone}}},0 response::
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 9,1 replyHeader:: 9,29149,-110 request:: '/master,,v{s{31,s{'world,'anyone}}},0 response::
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 10,1 replyHeader:: 10,29150,0 request:: '/master/_c_5be22a54-7d14-43df-851e-c89768566690-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response:: '/master/_c_5be22a54-7d14-43df-851e-c89768566690-lock-0000000000
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 11,1 replyHeader:: 11,29151,0 request:: '/master/_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response:: '/master/_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 12,1 replyHeader:: 12,29152,0 request:: '/master/_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response:: '/master/_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 13,12 replyHeader:: 13,29152,0 request:: '/master,F response:: v{'_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001,'_c_5be22a54-7d14-43df-851e-c89768566690-lock-0000000000,'_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002},s{29147,29147,1548128635857,1548128635857,0,3,0,0,0,3,29152}
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 14,12 replyHeader:: 14,29152,0 request:: '/master,F response:: v{'_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001,'_c_5be22a54-7d14-43df-851e-c89768566690-lock-0000000000,'_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002},s{29147,29147,1548128635857,1548128635857,0,3,0,0,0,3,29152}
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 15,12 replyHeader:: 15,29152,0 request:: '/master,F response:: v{'_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001,'_c_5be22a54-7d14-43df-851e-c89768566690-lock-0000000000,'_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002},s{29147,29147,1548128635857,1548128635857,0,3,0,0,0,3,29152}
选举master成功, 当前client:leaderSelector2
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 16,4 replyHeader:: 16,29152,0 request:: '/master/_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001,T response:: #3139322e3136382e35362e31,s{29151,29151,1548128635867,1548128635867,0,0,0,72057601034813459,12,0,29151}
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 17,4 replyHeader:: 17,29152,0 request:: '/master/_c_5be22a54-7d14-43df-851e-c89768566690-lock-0000000000,T response:: #3139322e3136382e35362e31,s{29150,29150,1548128635863,1548128635863,0,0,0,72057601034813459,12,0,29150}
Got ping response for sessionid: 0x1000001a10c0013 after 1ms
Got notification sessionid:0x1000001a10c0013
Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master/_c_5be22a54-7d14-43df-851e-c89768566690-lock-0000000000 for sessionid 0x1000001a10c0013
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 18,2 replyHeader:: 18,29153,0 request:: '/master/_c_5be22a54-7d14-43df-851e-c89768566690-lock-0000000000,-1 response:: null
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 19,12 replyHeader:: 19,29153,0 request:: '/master,F response:: v{'_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001,'_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002},s{29147,29147,1548128635857,1548128635857,0,4,0,0,0,2,29153}
选举master成功, 当前client:leaderSelector1
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 20,1 replyHeader:: 20,29154,0 request:: '/master/_c_acfad6ef-52a1-4a01-96e3-20ed4aad771b-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response:: '/master/_c_acfad6ef-52a1-4a01-96e3-20ed4aad771b-lock-0000000003
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 21,12 replyHeader:: 21,29154,0 request:: '/master,F response:: v{'_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001,'_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002,'_c_acfad6ef-52a1-4a01-96e3-20ed4aad771b-lock-0000000003},s{29147,29147,1548128635857,1548128635857,0,5,0,0,0,3,29154}
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 22,4 replyHeader:: 22,29154,0 request:: '/master/_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002,T response:: #3139322e3136382e35362e31,s{29152,29152,1548128635867,1548128635867,0,0,0,72057601034813459,12,0,29152}
Got ping response for sessionid: 0x1000001a10c0013 after 1ms
Got notification sessionid:0x1000001a10c0013
Got WatchedEvent state:SyncConnected type:NodeDeleted path:/master/_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001 for sessionid 0x1000001a10c0013
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 23,2 replyHeader:: 23,29155,0 request:: '/master/_c_485e7414-fba5-449c-92a9-5f6e60effd9f-lock-0000000001,-1 response:: null
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 24,12 replyHeader:: 24,29155,0 request:: '/master,F response:: v{'_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002,'_c_acfad6ef-52a1-4a01-96e3-20ed4aad771b-lock-0000000003},s{29147,29147,1548128635857,1548128635857,0,6,0,0,0,2,29155}
选举master成功, 当前client:leaderSelector3
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 25,1 replyHeader:: 25,29156,0 request:: '/master/_c_d85da285-561e-4374-9a95-9ac633b2c0c5-lock-,#3139322e3136382e35362e31,v{s{31,s{'world,'anyone}}},3 response:: '/master/_c_d85da285-561e-4374-9a95-9ac633b2c0c5-lock-0000000004
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 26,12 replyHeader:: 26,29156,0 request:: '/master,F response:: v{'_c_d85da285-561e-4374-9a95-9ac633b2c0c5-lock-0000000004,'_c_a7cc5eed-81fe-4601-a766-dcc67da49129-lock-0000000002,'_c_acfad6ef-52a1-4a01-96e3-20ed4aad771b-lock-0000000003},s{29147,29147,1548128635857,1548128635857,0,7,0,0,0,3,29156}
Reading reply sessionid:0x1000001a10c0013, packet:: clientPath:null serverPath:null finished:false header:: 27,4 replyHeader:: 27,29156,0 request:: '/master/_c_acfad6ef-52a1-4a01-96e3-20ed4aad771b-lock-0000000003,T response:: #3139322e3136382e35362e31,s{29154,29154,1548128637925,1548128637925,0,0,0,72057601034813459,12,0,29154}