• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
ZooKeeper | Curator Framework: Set the ACL of a zNode [setACL]
  1. Notes
  2. Example

  1. 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.
  2. Example
    Here's an example of how to set the ACL of a zNode:
© 2025  mtitek