liguangcheng opened a new issue, #18899: URL: https://github.com/apache/pulsar/issues/18899
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Version 2.10.2 ### Minimal reproduce step With zookeeper deployed, bookieId is set to hostname, and the broker cannot connect to bookie =============================================================== My preliminary analysis is that in the scenario of Zookeeper deployment, the broker should need to use zk to get the IP of Bookie In the following function, DNS is directly applied to resolve IP, and there is no support for zk ``` public BookieSocketAddress(String addr) throws UnknownHostException { String[] parts = addr.split(COLON); if (parts.length < 2) { throw new UnknownHostException(addr); } this.hostname = parts[0]; try { this.port = Integer.parseInt(parts[1]); } catch (NumberFormatException nfe) { throw new UnknownHostException(addr); } if (InetAddresses.isInetAddress(hostname)) { socketAddress = Optional.of(new InetSocketAddress(hostname, port)); } else { socketAddress = Optional.empty(); } } ``` ### What did you expect to see? broker should connect the bookie when bookieId set with hostname ### What did you see instead? N/A ### Anything else? N/A ### Are you willing to submit a PR? - [X] I'm willing to submit a PR! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
