public void ensurePath(String path, List<ACL> acl)
      throws TokenStoreException {
    try {
      CuratorFramework zk = getSession();
      String node = zk.create().creatingParentsIfNeeded().withMode(CreateMode.PERSISTENT)
          .withACL(acl).forPath(path);
      LOGGER.info("Created path: {} ", node);
    } catch (KeeperException.NodeExistsException e) {
      // node already exists
    } catch (Exception e) {
      throw new TokenStoreException("Error creating path " + path, e);
    }
  }
Create a path if it does not already exist ("mkdir -p")
@param path string with '/' separator
@param acl list of ACL entries
@throws TokenStoreException
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/security/ZooKeeperTokenStore.java