cmccabe commented on code in PR #15986: URL: https://github.com/apache/kafka/pull/15986#discussion_r1624858821
########## raft/src/main/java/org/apache/kafka/raft/QuorumConfig.java: ########## @@ -199,6 +206,34 @@ private static Map<Integer, InetSocketAddress> parseVoterConnections( return voterMap; } + public static InetSocketAddress parseBootstrapServer(String bootstrapServer) { + String host = Utils.getHost(bootstrapServer); + if (host == null) { + throw new ConfigException( + String.format( + "Failed to parse host name from {} for the configuration {}. Each " + + "entry should be in the form \"{host}:{port}\"", + bootstrapServer, + QUORUM_BOOTSTRAP_SERVERS_CONFIG + ) + ); + } + + Integer port = Utils.getPort(bootstrapServer); + if (port == null) { + throw new ConfigException( + String.format( + "Failed to parse host port from {} for the configuration {}. Each " + + "entry should be in the form \"{host}:{port}\"", + bootstrapServer, + QUORUM_BOOTSTRAP_SERVERS_CONFIG + ) + ); + } + + return InetSocketAddress.createUnresolved(host, port); Review Comment: oh, I thought `Utils.getHost` resolved the hostname. I can see now that it doesn't. Fair enough. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org