public void setRecursivelyOnSingle(ZooKeeper zkClient, String baseNode) throws KeeperException, InterruptedException {
    zkClient.setACL(baseNode, singletonList(asZkAcl()), ANY_NODE_VER);
    for (String child : zkClient.getChildren(baseNode, null)) {
      setRecursivelyOnSingle(zkClient, append(baseNode, child));
    }
  }
Sets the ACL on the znode indicated by the given pattern
ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkAcl.java