jackjlli commented on code in PR #8980: URL: https://github.com/apache/pinot/pull/8980#discussion_r909264714
########## pinot-query-runtime/src/main/java/org/apache/pinot/query/service/QueryConfig.java: ########## @@ -23,13 +23,13 @@ */ public class QueryConfig { public static final String KEY_OF_QUERY_SERVER_PORT = "pinot.query.server.port"; - public static final int DEFAULT_QUERY_SERVER_PORT = -1; + public static final int DEFAULT_QUERY_SERVER_PORT = 0; public static final String KEY_OF_QUERY_RUNNER_HOSTNAME = "pinot.query.runner.hostname"; public static final String DEFAULT_QUERY_RUNNER_HOSTNAME = "localhost"; // query runner port is the mailbox port. public static final String KEY_OF_QUERY_RUNNER_PORT = "pinot.query.runner.port"; - public static final int DEFAULT_QUERY_RUNNER_PORT = -1; + public static final int DEFAULT_QUERY_RUNNER_PORT = 0; Review Comment: Can we specify two default runner ports, one for broker and the other one for server? By doing so, you can just reuse the default port numbers (i.e. `8421` and `8442`) for both broker and server. ########## pinot-query-runtime/src/main/java/org/apache/pinot/query/service/QueryConfig.java: ########## @@ -23,13 +23,13 @@ */ public class QueryConfig { public static final String KEY_OF_QUERY_SERVER_PORT = "pinot.query.server.port"; - public static final int DEFAULT_QUERY_SERVER_PORT = -1; + public static final int DEFAULT_QUERY_SERVER_PORT = 0; Review Comment: And here you can just use `8842`. ########## pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/StartServiceManagerCommand.java: ########## @@ -218,11 +219,13 @@ private Map<String, Object> getDefaultConfig(ServiceRole serviceRole) ControllerConf.ControllerMode.DUAL, true); case BROKER: return PinotConfigUtils - .generateBrokerConf(_clusterName, _zkAddress, null, CommonConstants.Helix.DEFAULT_BROKER_QUERY_PORT); + .generateBrokerConf(_clusterName, _zkAddress, null, CommonConstants.Helix.DEFAULT_BROKER_QUERY_PORT, + QueryConfig.DEFAULT_QUERY_RUNNER_PORT); case SERVER: return PinotConfigUtils .generateServerConf(_clusterName, _zkAddress, null, CommonConstants.Helix.DEFAULT_SERVER_NETTY_PORT, - CommonConstants.Server.DEFAULT_ADMIN_API_PORT, CommonConstants.Server.DEFAULT_GRPC_PORT, null, null); + CommonConstants.Server.DEFAULT_ADMIN_API_PORT, CommonConstants.Server.DEFAULT_GRPC_PORT, + QueryConfig.DEFAULT_QUERY_SERVER_PORT, QueryConfig.DEFAULT_QUERY_RUNNER_PORT, null, null); Review Comment: Same here and Line 223. Specifying two different default ports for both broker and server would be much clearer. -- 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: commits-unsubscr...@pinot.apache.org 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