Browse Source

master startup lock dev update

pull/2/head
qiaozhanwei 6 years ago
parent
commit
2d617b56c8
  1. 6
      escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java

6
escheduler-server/src/main/java/cn/escheduler/server/zk/ZKMasterClient.java

@ -115,9 +115,9 @@ public class ZKMasterClient extends AbstractZKClient {
InterProcessMutex mutex = null;
try {
// create distributed lock with the root node path of the lock space as /escheduler/lock/failover/master
String znodeLock = zkMasterClient.getMasterStartUpLockPath();
String znodeLock = getMasterStartUpLockPath();
mutex = new InterProcessMutex(zkMasterClient.getZkClient(), znodeLock);
mutex = new InterProcessMutex(zkClient, znodeLock);
mutex.acquire();
// init system znode
@ -138,7 +138,7 @@ public class ZKMasterClient extends AbstractZKClient {
}
}catch (Exception e){
logger.error("master scheduler thread exception : " + e.getMessage(),e);
logger.error("master start up exception : " + e.getMessage(),e);
}finally {
if (mutex != null){
try {

Loading…
Cancel
Save