|
|
@ -85,8 +85,8 @@ public class ZKMasterClient extends AbstractZKClient { |
|
|
|
// master registry
|
|
|
|
// master registry
|
|
|
|
masterRegistry.registry(); |
|
|
|
masterRegistry.registry(); |
|
|
|
masterRegistry.getZookeeperRegistryCenter().setStoppable(masterServer); |
|
|
|
masterRegistry.getZookeeperRegistryCenter().setStoppable(masterServer); |
|
|
|
String registPath = this.masterRegistry.getMasterPath(); |
|
|
|
String registryPath = this.masterRegistry.getMasterPath(); |
|
|
|
masterRegistry.getZookeeperRegistryCenter().getRegisterOperator().handleDeadServer(registPath, ZKNodeType.MASTER, Constants.DELETE_ZK_OP); |
|
|
|
masterRegistry.getZookeeperRegistryCenter().getRegisterOperator().handleDeadServer(registryPath, ZKNodeType.MASTER, Constants.DELETE_ZK_OP); |
|
|
|
|
|
|
|
|
|
|
|
// init system znode
|
|
|
|
// init system znode
|
|
|
|
this.initSystemZNode(); |
|
|
|
this.initSystemZNode(); |
|
|
@ -178,9 +178,6 @@ public class ZKMasterClient extends AbstractZKClient { |
|
|
|
* @throws Exception exception |
|
|
|
* @throws Exception exception |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void failoverServerWhenDown(String serverHost, ZKNodeType zkNodeType) throws Exception { |
|
|
|
private void failoverServerWhenDown(String serverHost, ZKNodeType zkNodeType) throws Exception { |
|
|
|
if (StringUtils.isEmpty(serverHost)) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
switch (zkNodeType) { |
|
|
|
switch (zkNodeType) { |
|
|
|
case MASTER: |
|
|
|
case MASTER: |
|
|
|
failoverMaster(serverHost); |
|
|
|
failoverMaster(serverHost); |
|
|
|