private void startLocalZK() throws Exception { zkService = new ZooKeeperServiceRunner(zkPort, secureZK, jksKeyFile, keyPasswordFile, jksTrustFile); zkService.initialize(); zkService.start(); }
/** * 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."); }
zkKeyStore, zkKeyStorePasswd, zkTrustStore); runner.initialize(); runner.start(); Thread.sleep(Long.MAX_VALUE);