Github user anmolnar commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/650#discussion_r221922741
--- Diff: src/java/main/org/apache/zookeeper/cli/SetAclCommand.java ---
@@ -69,9 +72,22 @@ public boolean exec() throws CliException {
version = -1;
}
try {
- Stat stat = zk.setACL(path, acl, version);
- if (cl.hasOption("s")) {
- new StatPrinter(out).print(stat);
+ if (cl.hasOption("R")) {
+ ZKUtil.visitSubTreeDFS(zk, path, false, new
StringCallback() {
+ @Override
+ public void processResult(int rc, String path, Object
ctx, String name) {
+ try {
+ zk.setACL(path, acl, version);
+ } catch (KeeperException | InterruptedException e)
{
+ out.print(e.getMessage());
+ }
+ }
+ });
+ } else {
+ Stat stat = zk.setACL(path, acl, version);
+ if (cl.hasOption("s")) {
--- End diff --
Unfortunately we don't have documentation for the CLI. It would be useful
to start one either on wiki, in docs or implement a more detailed help page,
but I don't want to overload this PR.
What if we just add a more detailed javadoc to the class?
---