public static void main(String[] args) throws Exception {
    CommandLine cli = new DefaultParser().parse(options(), args);
    if (cli.hasOption("connection-string") && cli.hasOption("znode")) {
      if (cli.hasOption("acl") && !cli.hasOption("delete")) {
        setAcls(cli.getOptionValue("connection-string"), cli.getOptionValue("znode"), ZkAcl.parse(cli.getOptionValue("acl")));
      } else if (cli.hasOption("delete") && !cli.hasOption("acl")) {
        deleteZnodeRecursively(cli.getOptionValue("connection-string"), cli.getOptionValue("znode"));
      } else {
        printHelp();
      }
    } else {
      printHelp();
    }
  }
I'm a command line utility that provides functionality that the official zookeeper-client does not support.
E.g. I can set ACLs recursively on a znode.
Also I can remove znode recursively.
ambari-agent/src/main/java/org/apache/ambari/tools/zk/ZkMigrator.java