Jackie-Jiang commented on a change in pull request #6558: URL: https://github.com/apache/incubator-pinot/pull/6558#discussion_r574051198
########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java ########## @@ -51,17 +52,18 @@ private ZookeeperInstance(PublicZooKeeperServerMain serverMain, String dataDirPa static class PublicZooKeeperServerMain extends ZooKeeperServerMain { @Override public void initializeAndRun(String[] args) - throws QuorumPeerConfig.ConfigException, IOException { + throws QuorumPeerConfig.ConfigException, IOException, AdminServer.AdminServerException { // org.apache.log4j.jmx.* is not compatible under log4j-1.2-api, which provides the backward compatibility for // log4j 1.* api for log4j2. In order to avoid 'class not found error', the following line disables log4j jmx // bean registration for local zookeeper instance System.setProperty("zookeeper.jmx.log4j.disable", "true"); + System.setProperty("zookeeper.admin.enableServer", "false"); super.initializeAndRun(args); } @Override public void runFromConfig(final ServerConfig config) - throws IOException { + throws IOException, AdminServer.AdminServerException { Review comment: Same here ########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java ########## @@ -154,18 +156,23 @@ public synchronized static ZookeeperInstance startLocalZkServer(final int port, public void run() { try { zookeeperServerMain.initializeAndRun(args); - } catch (QuorumPeerConfig.ConfigException e) { - LOGGER.warn("Caught exception while starting ZK", e); - } catch (IOException e) { + } catch (Exception e) { LOGGER.warn("Caught exception while starting ZK", e); } } }.start(); // Wait until the ZK server is started - ZkClient client = new ZkClient("localhost:" + port, 10000); - client.waitUntilConnected(10L, TimeUnit.SECONDS); - client.close(); + for (int i = 0; i < 10; i++) { Review comment: Don't quite follow this part. Why do we connect 10 times? It will sleep for at least 10 seconds ########## File path: pinot-common/src/main/java/org/apache/pinot/common/utils/ZkStarter.java ########## @@ -51,17 +52,18 @@ private ZookeeperInstance(PublicZooKeeperServerMain serverMain, String dataDirPa static class PublicZooKeeperServerMain extends ZooKeeperServerMain { @Override public void initializeAndRun(String[] args) - throws QuorumPeerConfig.ConfigException, IOException { + throws QuorumPeerConfig.ConfigException, IOException, AdminServer.AdminServerException { Review comment: Where is `AdminServer.AdminServerException` thrown from? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org