@InterfaceAudience.Private public class ZKUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ZKUtil.BadAclFormatException |
static class |
ZKUtil.BadAuthFormatException |
static class |
ZKUtil.ZKAuthInfo
An authentication token passed to ZooKeeper.addAuthInfo
|
| Constructor and Description |
|---|
ZKUtil() |
| Modifier and Type | Method and Description |
|---|---|
static List<org.apache.zookeeper.data.ACL> |
parseACLs(String aclString)
Parse comma separated list of ACL entries to secure generated nodes, e.g.
|
static List<ZKUtil.ZKAuthInfo> |
parseAuth(String authString)
Parse a comma-separated list of authentication mechanisms.
|
static String |
resolveConfIndirection(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 List<org.apache.zookeeper.data.ACL> parseACLs(String aclString) throws ZKUtil.BadAclFormatException
sasl:hdfs/host1@MY.DOMAIN:cdrwa,sasl:hdfs/host2@MY.DOMAIN:cdrwa{@link - BadAclFormatException} if an ACL is invalidZKUtil.BadAclFormatExceptionpublic static List<ZKUtil.ZKAuthInfo> parseAuth(String authString) throws ZKUtil.BadAuthFormatException
authString - the comma-separated auth mechanisms{@link - BadAuthFormatException} if the auth format is invalidZKUtil.BadAuthFormatExceptionpublic static String resolveConfIndirection(String valInConf) throws IOException
valInConf - the value from the ConfigurationIOException - if the file cannot be readCopyright © 2013 Apache Software Foundation. All rights reserved.