apucher commented on a change in pull request #6418: URL: https://github.com/apache/incubator-pinot/pull/6418#discussion_r561278733
########## 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: This is the same code as on the multi-ingress controller. For completeness sake, I verified the behavior for different scenarios via quickstart: pinot.broker.client.queryPort only: `Broker_192.168.0.126_8000` pinot.broker.client.queryPort and https ingress: `Broker_192.168.0.126_8000` http and https ingress only: `Broker_192.168.0.126_8000` https ingress only: `Broker_192.168.0.126_8443` no config: `exception "No value present”` ---------------------------------------------------------------- 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