Description
public ZooKeeperWatcher(Configuration conf, String identifier, Abortable abortable, boolean canCreateBaseZNode) throws IOException, ZooKeeperConnectionException { ...skip... this.recoverableZooKeeper = ZKUtil.connect(... ...skip... if (canCreateBaseZNode) { createBaseZNodes(); } } private void createBaseZNodes() throws ZooKeeperConnectionException {
The registered watcher doesn't seem to close the Zookeeper instance by watch events, and the instance keeps alive when createBaseZNodes is failed.