private synchronized void ensureZookeeperTrackers() throws ZooKeeperConnectionException { // initialize zookeeper and master address manager if (zooKeeper == null) { zooKeeper = getZooKeeperWatcher(); } if (clusterId == null) { clusterId = new ClusterId(); } if (masterAddressTracker == null) { masterAddressTracker = new MasterAddressTracker(zooKeeper, this); masterAddressTracker.start(); } }
this.masterAddressManager.start(); blockAndCheckIfStopped(this.masterAddressManager);