com.twitter.distributedlog.acl.ZKAccessControlManager.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(79)

本文整理了Java中com.twitter.distributedlog.acl.ZKAccessControlManager.<init>()方法的一些代码示例,展示了ZKAccessControlManager.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKAccessControlManager.<init>()方法的具体详情如下:
包路径:com.twitter.distributedlog.acl.ZKAccessControlManager
类名称:ZKAccessControlManager
方法名:<init>

ZKAccessControlManager.<init>介绍

暂无

代码示例

代码示例来源:origin: twitter/distributedlog

@Override
public synchronized AccessControlManager createAccessControlManager() throws IOException {
  if (null == accessControlManager) {
    String aclRootPath = bkdlConfig.getACLRootPath();
    // Build the access control manager
    if (aclRootPath == null) {
      accessControlManager = DefaultAccessControlManager.INSTANCE;
      LOG.info("Created default access control manager for {}", namespace);
    } else {
      if (!isReservedStreamName(aclRootPath)) {
        throw new IOException("Invalid Access Control List Root Path : " + aclRootPath);
      }
      String zkRootPath = namespace.getPath() + "/" + aclRootPath;
      LOG.info("Creating zk based access control manager @ {} for {}",
          zkRootPath, namespace);
      accessControlManager = new ZKAccessControlManager(conf, sharedReaderZKCForDL,
          zkRootPath, scheduler);
      LOG.info("Created zk based access control manager @ {} for {}",
          zkRootPath, namespace);
    }
  }
  return accessControlManager;
}

代码示例来源:origin: twitter/distributedlog

String stream2 = "test-acm-2";
logger.info("Creating ACL Manager for {}", zkRootPath);
ZKAccessControlManager zkcm = new ZKAccessControlManager(conf, zkc, zkRootPath, executorService);
logger.info("Created ACL Manager for {}", zkRootPath);
try {

相关文章

ZKAccessControlManager类方法