本文整理了Java中org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher.isClientReadable()
方法的一些代码示例,展示了ZooKeeperWatcher.isClientReadable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZooKeeperWatcher.isClientReadable()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher
类名称:ZooKeeperWatcher
方法名:isClientReadable
[英]Returns whether the znode is supposed to be readable by the client and DOES NOT contain sensitive information (world readable).
[中]返回znode是否应该由客户端读取,并且不包含敏感信息(世界可读)。
代码示例来源:origin: com.aliyun.hbase/alihbase-client
public static ArrayList<ACL> createACL(ZooKeeperWatcher zkw, String node,
boolean isSecureZooKeeper) {
if (!node.startsWith(zkw.baseZNode)) {
return Ids.OPEN_ACL_UNSAFE;
}
if (isSecureZooKeeper) {
String superUser = zkw.getConfiguration().get("hbase.superuser");
ArrayList<ACL> acls = new ArrayList<ACL>();
// add permission to hbase supper user
if (superUser != null) {
acls.add(new ACL(Perms.ALL, new Id("sasl", superUser)));
}
// Certain znodes are accessed directly by the client,
// so they must be readable by non-authenticated clients
if (zkw.isClientReadable(node)) {
acls.addAll(Ids.CREATOR_ALL_ACL);
acls.addAll(Ids.READ_ACL_UNSAFE);
} else {
acls.addAll(Ids.CREATOR_ALL_ACL);
}
return acls;
} else {
return Ids.OPEN_ACL_UNSAFE;
}
}
代码示例来源:origin: harbby/presto-connectors
if (zkw.isClientReadable(node)) {
acls.addAll(Ids.CREATOR_ALL_ACL);
acls.addAll(Ids.READ_ACL_UNSAFE);
内容来源于网络,如有侵权,请联系作者删除!