public void shutdown() { try { // close listen socket and signal selector threads to stop stop(); // wait for selector and worker threads to shutdown join(); // close all open connections closeAll(); if (login != null) { login.shutdown(); } } catch (InterruptedException e) { LOG.warn("Ignoring interrupted exception during shutdown", e); } catch (Exception e) { LOG.warn("Ignoring unexpected exception during shutdown", e); } if (zkServer != null) { zkServer.shutdown(); } }
@Override public void run() { try { EmbeddedZookeeperServer.this.connectionFactory.join(); } catch (InterruptedException e) { log.error("Zookeeper Connection Factory Interrupted", e); } } });
@Override public void run() { try { _cnxnFactory.join(); } catch(InterruptedException e) { throw new InternalException(e); } } });
@PreDestroy public void shutdown() { LOG.info("Shutting down ZkServer..."); try { if(_zkClient != null) { _zkClient.close(); } } catch (ZkException e) { LOG.warn("Error on closing zkclient: " + e.getClass().getName()); } if (_nioFactory != null) { _nioFactory.shutdown(); try { _nioFactory.join(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } _nioFactory = null; } if (_zk != null) { _zk.shutdown(); _zk = null; } LOG.info("Shutting down ZkServer...done"); }
protected void shutdown() { if (connectionFactory != null) { connectionFactory.shutdown(); try { connectionFactory.join(); } catch (InterruptedException e) { // Ignore } connectionFactory = null; } if(zooKeeperServer!=null) { zooKeeperServer.shutdown(); zooKeeperServer = null; } }
protected void shutdown() { if (connectionFactory != null) { connectionFactory.shutdown(); try { connectionFactory.join(); } catch (InterruptedException e) { // Ignore } connectionFactory = null; } if(zooKeeperServer!=null) { zooKeeperServer.shutdown(); zooKeeperServer = null; } }
@Override public void close() throws IOException { cnxnFactory.shutdown(); try { cnxnFactory.join(); } catch (InterruptedException e) { throw new InterruptedIOException(); } if (server.getZKDatabase() != null) { // see https://issues.apache.org/jira/browse/ZOOKEEPER-1459 server.getZKDatabase().close(); } }
public void shutdown() throws Exception { try { connectionFactory.shutdown(); connectionFactory.join(); zkServer.shutdown(); while (zkServer.isRunning()) { zkServer.shutdown(); Thread.sleep(100); } } finally { try { cleanZookeeperDir(); } catch (Exception e) { LOG.warn("Error cleaning up ZK data directory {}", e); } } }
public void shutdown() throws Exception { try { connectionFactory.shutdown(); connectionFactory.join(); zkServer.shutdown(); while (zkServer.isRunning()) { zkServer.shutdown(); Thread.sleep(100); } } finally { try { cleanZookeeperDir(); } catch (Exception e) { LOG.warn("Error cleaning up ZK data directory {}", e); } } }
@Override public void destroy() throws Exception { cnxnFactory.shutdown(); cnxnFactory.join(); if (server.getZKDatabase() != null) { // see https://issues.apache.org/jira/browse/ZOOKEEPER-1459 server.getZKDatabase().close(); } }
@Override public void destroy() throws Exception { cnxnFactory.shutdown(); cnxnFactory.join(); if (server.getZKDatabase() != null) { // see https://issues.apache.org/jira/browse/ZOOKEEPER-1459 server.getZKDatabase().close(); } }
@Override public void close() { if (started.get()) { cnxnFactory.shutdown(); try { cnxnFactory.join(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } if (zkServer.isRunning()) { zkServer.shutdown(); } deleteRecursively(zkDataDir); } }