目录
2021SC@SDUSC
服务端Leader启动
1、启动zookeeper服务
[1]、Leader.java
[2]、LeaderZooKeeperServer.java
[3]、ZookeeperServer.java
2、接收各种请求
3、等待处理各种请求
2021SC@SDUSC
服务端Leader启动
1、启动zookeeper服务
[1]、Leader.java
lead()
startZkServer();//启动服务
zk.startup();
[2]、LeaderZooKeeperServer.java
super.startup();
[3]、ZookeeperServer.java
startup();
//启动线程,准备接收各种请求
setupRequestProcessors();
new PrepRequestProcessor().start
2、接收各种请求
Request request = submittedRequests.take();
pRequest(request);
3、等待处理各种请求
case OpCode.createContainer:
case OpCode.create:
case OpCode.create2:
case OpCode.createTTL:
case OpCode.deleteContainer:
case OpCode.delete:
case OpCode.setData:
case OpCode.reconfig:
case OpCode.setACL:
case OpCode.check:
|