public RunningJobManager(String zkQuorum, int zkSessionTimeoutMs, int zkRetryTimes, int zkRetryInterval, String zkRoot, String lockPath) { this.zkRoot = zkRoot; curator = newCurator(zkQuorum, zkSessionTimeoutMs, zkRetryTimes, zkRetryInterval); try { curator.start(); } catch (Exception e) { LOG.error("curator start error {}", e); } LOG.info("InterProcessMutex lock path is " + lockPath); lock = new InterProcessMutex(curator, lockPath); try { if (curator.checkExists().forPath(this.zkRoot) == null) { curator.create() .creatingParentsIfNeeded() .withMode(CreateMode.PERSISTENT) .forPath(this.zkRoot); } } catch (Exception e) { LOG.warn("{}", e); } }