io.pravega.segmentstore.storage.impl.bookkeeper.ZooKeeperServiceRunner.start()方法的使用及代码示例

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

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

ZooKeeperServiceRunner.start介绍

[英]Starts the ZooKeeper Service in process.
[中]启动正在运行的ZooKeeper服务。

代码示例

代码示例来源:origin: pravega/pravega

private void startLocalZK() throws Exception {
  zkService = new ZooKeeperServiceRunner(zkPort, secureZK, jksKeyFile, keyPasswordFile, jksTrustFile);
  zkService.initialize();
  zkService.start();
}

代码示例来源:origin: pravega/pravega

/**
 * Resumes ZooKeeper (if it had previously been suspended).
 *
 * @throws Exception If an exception got thrown.
 */
public void resumeZooKeeper() throws Exception {
  val zk = new ZooKeeperServiceRunner(this.zkPort, this.secureZK, this.tLSKeyStore, this.tLSKeyStorePasswordPath, this.tlsTrustStore);
  if (this.zkServer.compareAndSet(null, zk)) {
    // Initialize ZK runner (since nobody else did it for us).
    zk.initialize();
    log.info("ZooKeeper initialized.");
  } else {
    zk.close();
  }
  // Start or resume ZK.
  this.zkServer.get().start();
  log.info("ZooKeeper resumed.");
}

代码示例来源:origin: pravega/pravega

zkKeyStore, zkKeyStorePasswd, zkTrustStore);
runner.initialize();
runner.start();
Thread.sleep(Long.MAX_VALUE);

相关文章