@Private
public class ZKUtil
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ZKUtil.BadAclFormatException |
|
static class |
ZKUtil.BadAuthFormatException |
|
static class |
ZKUtil.ZKAuthInfo |
An authentication token passed to ZooKeeper.addAuthInfo
|
| Constructor | Description |
|---|---|
ZKUtil() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.List<org.apache.zookeeper.data.ACL> |
parseACLs(java.lang.String aclString) |
Parse comma separated list of ACL entries to secure generated nodes, e.g.
|
static java.util.List<ZKUtil.ZKAuthInfo> |
parseAuth(java.lang.String authString) |
Parse a comma-separated list of authentication mechanisms.
|
static int |
removeSpecificPerms(int perms,
int remove) |
Helper method to remove a subset of permissions (remove) from a
given set (perms).
|
static java.lang.String |
resolveConfIndirection(java.lang.String valInConf) |
Because ZK ACLs and authentication information may be secret,
allow the configuration values to be indirected through a file
by specifying the configuration as "@/path/to/file".
|
public static int removeSpecificPerms(int perms,
int remove)
perms - The permissions flag to remove from. Should be an OR of a
some combination of ZooDefs.Permsremove - The permissions to be removed. Should be an OR of a
some combination of ZooDefs.PermsZooDefs.Perms
present in perms and not present in removepublic static java.util.List<org.apache.zookeeper.data.ACL> parseACLs(java.lang.String aclString)
throws ZKUtil.BadAclFormatException
sasl:hdfs/host1@MY.DOMAIN:cdrwa,sasl:hdfs/host2@MY.DOMAIN:cdrwaaclString - aclString.ZKUtil.BadAclFormatException - if an ACL is invalidpublic static java.util.List<ZKUtil.ZKAuthInfo> parseAuth(java.lang.String authString) throws ZKUtil.BadAuthFormatException
authString - the comma-separated auth mechanismsZKUtil.BadAuthFormatException - if the auth format is invalidpublic static java.lang.String resolveConfIndirection(java.lang.String valInConf)
throws java.io.IOException
valInConf - the value from the Configurationjava.io.IOException - if the file cannot be readCopyright © 2008–2025 Apache Software Foundation. All rights reserved.