Notes:
The code bellow let you set the ACL of a zNode.
To set the ACL of a zNode you have to define:
► The ACL Scheme: "world
", "auth
", "digest
", "ip
".
► The ACL Scheme Id: for example, the scheme "world
" has a single Id "anyone
".
► The ACL permissions: "ALL
", "ADMIN
", "CREATE
", "DELETE
", "READ
", "WRITE
".
Calling the method "CuratorFramework::setACL
" will initialize the ACL of a zNode and return a "Stat
" object.
You will get this error if the zNode doesn't exist in ZooKeeper:
You will get this error if the ACL is invalid:
You will get this error if you don't have permissions to set the ACL of a zNode:
In order for the code bellow to work:
► Make sure to update the "CONNECT_STRING
" variable with your information.