mwkang commented on code in PR #5869: URL: https://github.com/apache/hbase/pull/5869#discussion_r1590191451
########## hbase-zookeeper/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKMainServer.java: ########## @@ -41,7 +42,8 @@ public String parse(final Configuration c) { * ZooKeeper 3.4.6 broke being able to pass commands on command line. See ZOOKEEPER-1897. This * class is a hack to restore this faclity. */ - private static class HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain extends ZooKeeperMain { + private static class HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain extends ZooKeeperMain + implements Closeable { Review Comment: Thank you for reviewing the code and thank you for mentioning ZOOKEEPER-4804. I did not know that non-daemon Netty threads issue had been resolved in ZooKeeper. It seems that the `HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain` class is no longer necessary. Instead of using `HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain`, it might be better to use `ZooKeeperMain` directly. `ZooKeeperMain` also closes `ZooKeeper` when a timeout occurs. However, it seems that the ZOOKEEPER-4804 patch is not applied in the 3.8.4 version used by HBase. Therefore, in order to remove `HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain`, it appears that a ZooKeeper version upgrade(3.8.4 -> 3.9.x) is necessary. Two options are suggested below. Which option would be the most appropriate? 1. Upgrade ZooKeeper to version 3.9.x and remove `HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain` (Personally prefer.) Is it safe to upgrade ZooKeeper to version 3.9.x? I am concerned that other issues may arise. 2. Always ensure `HACK_UNTIL_ZOOKEEPER_1897_ZooKeeperMain` performs closing. (Current approach) -- 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. To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org