本文整理了Java中org.apache.kylin.storage.hbase.util.ZookeeperAclBuilder.getZKAcls()
方法的一些代码示例,展示了ZookeeperAclBuilder.getZKAcls()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZookeeperAclBuilder.getZKAcls()
方法的具体详情如下:
包路径:org.apache.kylin.storage.hbase.util.ZookeeperAclBuilder
类名称:ZookeeperAclBuilder
方法名:getZKAcls
暂无
代码示例来源:origin: apache/kylin
public ZookeeperAclBuilder invoke() {
try {
if (isNeedAcl()) {
zkAcls = getZKAcls();
zkAuthInfo = getZKAuths();
}
} catch (Exception e) {
isNeedAcl = false;
return this;
}
return this;
}
代码示例来源:origin: apache/kylin
@Test
public void testAclEnabled() {
KylinConfig testConfig = KylinConfig.getInstanceFromEnv();
testConfig.setProperty("kylin.env.zookeeper-acl-enabled", "true");
ZookeeperAclBuilder zookeeperAclBuilder = new ZookeeperAclBuilder().invoke();
Assert.assertNotNull(zookeeperAclBuilder);
Assert.assertTrue(zookeeperAclBuilder.isNeedAcl());
List<ACL> zkAcls = Lists.newArrayList();
try {
zkAcls = ZookeeperAclBuilder.getZKAcls();
Assert.assertFalse(zkAcls.isEmpty());
} catch (Exception e) {
fail("Couldn't read ACLs based on 'kylin.env.zookeeper.zk-acl' in kylin.properties");
}
List<ZKUtil.ZKAuthInfo> zkAuthInfo = Lists.newArrayList();
try {
zkAuthInfo = ZookeeperAclBuilder.getZKAuths();
Assert.assertFalse(zkAuthInfo.isEmpty());
} catch (Exception e) {
fail("Couldn't read Auth based on 'kylin.env.zookeeper.zk-auth' in kylin.properties");
}
Builder builder = zookeeperAclBuilder.setZKAclBuilder(CuratorFrameworkFactory.builder());
Assert.assertNotNull(builder);
Assert.assertEquals(zkAcls, builder.getAclProvider().getDefaultAcl());
Assert.assertNotNull(builder.getAuthInfos());
}
代码示例来源:origin: org.apache.kylin/kylin-storage-hbase
public ZookeeperAclBuilder invoke() {
try {
if (isNeedAcl()) {
zkAcls = getZKAcls();
zkAuthInfo = getZKAuths();
}
} catch (Exception e) {
isNeedAcl = false;
return this;
}
return this;
}
内容来源于网络,如有侵权,请联系作者删除!