apucher commented on a change in pull request #6418: URL: https://github.com/apache/incubator-pinot/pull/6418#discussion_r557829165
########## File path: pinot-broker/src/main/java/org/apache/pinot/broker/broker/helix/HelixBrokerStarter.java ########## @@ -117,13 +124,18 @@ public HelixBrokerStarter(PinotConfiguration brokerConf, String clusterName, Str brokerHost = _brokerConf.getProperty(CommonConstants.Helix.SET_INSTANCE_ID_TO_HOSTNAME_KEY, false) ? NetUtil .getHostnameOrAddress() : NetUtil.getHostAddress(); } + _brokerId = _brokerConf.getProperty(Helix.Instance.INSTANCE_ID_KEY, - Helix.PREFIX_OF_BROKER_INSTANCE + brokerHost + "_" + _brokerConf - .getProperty(Helix.KEY_OF_BROKER_QUERY_PORT, Helix.DEFAULT_BROKER_QUERY_PORT)); + Helix.PREFIX_OF_BROKER_INSTANCE + brokerHost + "_" + inferPort()); _brokerConf.addProperty(Broker.CONFIG_OF_BROKER_ID, _brokerId); } + private int inferPort() { + return Optional.ofNullable(_brokerConf.getProperty(Helix.KEY_OF_BROKER_QUERY_PORT)).map(Integer::parseInt) Review comment: starting on DEFAULT_BROKER_QUERY_PORT is ensured by ListenerConfigUtil. Here, we merely need to figure out a port number to generate an instance id for Helix ---------------------------------------------------------------- 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