private void createBaseZNodes() throws ZooKeeperConnectionException {
    try {
      // Create all the necessary "directories" of znodes
      ZKUtil.createWithParents(this, znodePaths.baseZNode);
      ZKUtil.createAndFailSilent(this, znodePaths.rsZNode);
      ZKUtil.createAndFailSilent(this, znodePaths.drainingZNode);
      ZKUtil.createAndFailSilent(this, znodePaths.tableZNode);
      ZKUtil.createAndFailSilent(this, znodePaths.splitLogZNode);
      ZKUtil.createAndFailSilent(this, znodePaths.backupMasterAddressesZNode);
      ZKUtil.createAndFailSilent(this, znodePaths.masterMaintZNode);
    } catch (KeeperException e) {
      throw new ZooKeeperConnectionException(
        prefix("Unexpected KeeperException creating base node"), e);
    }
  }
Instantiate a ZooKeeper connection and watcher.
@param conf               the configuration to use
@param identifier         string that is passed to RecoverableZookeeper to be used as
                          identifier for this instance. Use null for default.
@param abortable          Can be null if there is on error there is no host to abort: e.g.
                          client context.
@param canCreateBaseZNode true if a base ZNode can be created
@param clientZK           whether this watcher is set to access client ZK
@throws IOException                  if the connection to ZooKeeper fails
@throws ZooKeeperConnectionException if the connection to Zookeeper fails when create base
                                     ZNodes
hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKWatcher.java