gpt4 book ai didi

org.apache.bookkeeper.shims.zk.ZooKeeperServerShim.stop()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 22:07:31 29 4
gpt4 key购买 nike

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

ZooKeeperServerShim.stop介绍

[英]Stop the zookeeper server.
[中]停止zookeeper服务器。

代码示例

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

public void stop() throws Exception {
  if (null != dlServer) {
    this.dlServer.shutdown();
  }
  this.dlmEmulator.teardown();
  if (null != this.zks) {
    this.zks.stop();
  }
  for (File dir : tmpDirs) {
    FileUtils.deleteDirectory(dir);
  }
}

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

@AfterClass
  public static void shutdownZooKeeper() throws Exception {
    zks.stop();
    if (null != zkDir) {
      FileUtils.deleteDirectory(zkDir);
    }
  }
}

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

@AfterClass
public static void teardownCluster() throws Exception {
  bkutil.teardown();
  zks.stop();
  for (File dir : tmpDirs) {
    FileUtils.deleteDirectory(dir);
  }
}

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

@Test(timeout = 60000)
  public void testRunZookeeperOnAnyPort() throws Exception {
    Pair<ZooKeeperServerShim, Integer> serverAndPort1 = null;
    Pair<ZooKeeperServerShim, Integer> serverAndPort2 = null;
    Pair<ZooKeeperServerShim, Integer> serverAndPort3 = null;
    try {
      File zkTmpDir1 = IOUtils.createTempDir("zookeeper1", "distrlog");
      serverAndPort1 = LocalDLMEmulator.runZookeeperOnAnyPort(7000, zkTmpDir1);
      File zkTmpDir2 = IOUtils.createTempDir("zookeeper2", "distrlog");
      serverAndPort2 = LocalDLMEmulator.runZookeeperOnAnyPort(7000, zkTmpDir2);
      File zkTmpDir3 = IOUtils.createTempDir("zookeeper3", "distrlog");
      serverAndPort3 = LocalDLMEmulator.runZookeeperOnAnyPort(7000, zkTmpDir3);
    } catch (Exception ex) {
      if (null != serverAndPort1) {
        serverAndPort1.getLeft().stop();
      }
      if (null != serverAndPort2) {
        serverAndPort2.getLeft().stop();
      }
      if (null != serverAndPort3) {
        serverAndPort3.getLeft().stop();
      }
    }
  }
}

代码示例来源:origin: org.apache.distributedlog/distributedlog-service

public void stop() throws Exception {
  if (null != dlServer) {
    this.dlServer.shutdown();
  }
  this.dlmEmulator.teardown();
  if (null != this.zks) {
    this.zks.stop();
  }
  for (File dir : tmpDirs) {
    FileUtils.forceDeleteOnExit(dir);
  }
}

代码示例来源:origin: org.apache.bookkeeper/bookkeeper-server

zks.stop();

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com