gpt4 book ai didi

org.apache.zookeeper.server.ZooKeeperServer.startup()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 04:46:40 27 4
gpt4 key购买 nike

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

ZooKeeperServer.startup介绍

暂无

代码示例

代码示例来源:origin: apache/zookeeper

@Override
public synchronized void startup() {
  // check to avoid startup follows shutdown
  if (shutdown) {
    LOG.warn("Not starting Read-only server as startup follows shutdown!");
    return;
  }
  registerJMX(new ReadOnlyBean(this), self.jmxLocalPeerBean);
  super.startup();
  self.setZooKeeperServer(this);
  self.adminServer.setZooKeeperServer(this);
  LOG.info("Read-only server started");
}

代码示例来源:origin: apache/zookeeper

@Override
public void startup(ZooKeeperServer zks, boolean startServer)
    throws IOException, InterruptedException {
  start();
  setZooKeeperServer(zks);
  if (startServer) {
    zks.startdata();
    zks.startup();
  }
}

代码示例来源:origin: apache/zookeeper

@Override
public void startup(ZooKeeperServer zks, boolean startServer)
    throws IOException, InterruptedException {
  start();
  setZooKeeperServer(zks);
  if (startServer) {
    zks.startdata();
    zks.startup();
  }
}

代码示例来源:origin: apache/zookeeper

@Override
public synchronized void startup() {
  try {
    startupInvokedLatch.countDown();
    // Delaying the zk server startup so that
    // ZooKeeperServer#sessionTracker reference won't be
    // initialized. In the defect scenario, while processing the
    // connection request zkServer needs sessionTracker reference,
    // but this is not yet initialized and the server is still in
    // the startup phase, resulting in NPE.
    startupDelayLatch.await();
  } catch (InterruptedException e) {
    Assert.fail(
        "Unexpected InterruptedException while startinng up!");
  }
  super.startup();
}

代码示例来源:origin: org.apache.zookeeper/zookeeper

@Override
public void startup(ZooKeeperServer zks) throws IOException,
    InterruptedException {
  start();
  setZooKeeperServer(zks);
  zks.startdata();
  zks.startup();
}

代码示例来源:origin: org.apache.zookeeper/zookeeper

@Override
public void startup(ZooKeeperServer zks) throws IOException,
    InterruptedException {
  start();
  setZooKeeperServer(zks);
  zks.startdata();
  zks.startup();
}

代码示例来源:origin: org.apache.hadoop/zookeeper

public void startup(ZooKeeperServer zks) throws IOException,
    InterruptedException {
  start();
  zks.startup();
  setZooKeeperServer(zks);
}

代码示例来源:origin: org.seaborne.rdf-delta/rdf-delta-server-local

public void start() {
  // See ZooKeeperServerMain.runFromConfig
  LOG.info("Starting server");
  boolean needStartZKServer = true;
  LogCtl.disable("org.apache.zookeeper.server.ZooKeeperServer");
  // ZooKeeperServer logs an error because ZooKeeperServerShutdownHandler not set but that is not an accessible class.
  try {
    if (config.getClientPortAddress() != null) {
      cnxnFactory = ServerCnxnFactory.createFactory();
      cnxnFactory.configure(config.getClientPortAddress(), config.getMaxClientCnxns(), false);
      cnxnFactory.startup(zkServer);
      // zkServer has been started. So we don't need to start it again in secureCnxnFactory.
      needStartZKServer = false;
    }
    if (config.getSecureClientPortAddress() != null) {
      secureCnxnFactory = ServerCnxnFactory.createFactory();
      secureCnxnFactory.configure(config.getSecureClientPortAddress(), config.getMaxClientCnxns(), true);
      secureCnxnFactory.startup(zkServer, needStartZKServer);
    }
    if ( needStartZKServer )
      zkServer.startup();
  } catch (IOException e) {
    throw new RuntimeIOException(e);
  } catch (InterruptedException e) {
    // Note from ZookeeperServerMain: "warn, but generally this is ok"
    LOG.warn("Server interrupted", e);
  } finally {
    LogCtl.setLevel("org.apache.zookeeper.server.ZooKeeperServer", "WARN");
  }
}

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