anmolnar commented on a change in pull request #1048: ZOOKEEPER-3188: Improve resilience to network URL: https://github.com/apache/zookeeper/pull/1048#discussion_r313421651
########## File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/admin/Commands.java ########## @@ -657,11 +647,31 @@ public CommandResponse run(ZooKeeperServer zkServer, Map<String, String> kwargs) TreeMap::new)); } + private String getMultiAddressString(QuorumPeer.QuorumServer qs) { + return qs.addr.getAllAddresses().stream() + .map(address -> getSingleAddressString(qs, address)) + .collect(Collectors.joining(",")); + } + + private String getSingleAddressString(QuorumPeer.QuorumServer qs, InetSocketAddress address) { Review comment: I believe that we don't need this magic here which is trying to recreate the original config file contents. The output of admin command doesn't need to match with the configuration, so you can just dump the contents of the internal representation (map) which I think more helpful for anyway reading this output. ---------------------------------------------------------------- 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 With regards, Apache Git Services