@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"); }
@Override public void startup(ZooKeeperServer zks, boolean startServer) throws IOException, InterruptedException { start(); setZooKeeperServer(zks); if (startServer) { zks.startdata(); zks.startup(); } }
@Override public void startup(ZooKeeperServer zks, boolean startServer) throws IOException, InterruptedException { start(); setZooKeeperServer(zks); if (startServer) { zks.startdata(); zks.startup(); } }
@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(); }
@Override public void startup(ZooKeeperServer zks) throws IOException, InterruptedException { start(); setZooKeeperServer(zks); zks.startdata(); zks.startup(); }
@Override public void startup(ZooKeeperServer zks) throws IOException, InterruptedException { start(); setZooKeeperServer(zks); zks.startdata(); zks.startup(); }
public void startup(ZooKeeperServer zks) throws IOException, InterruptedException { start(); zks.startup(); setZooKeeperServer(zks); }
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"); } }