avshenuk opened a new issue, #16259: URL: https://github.com/apache/pinot/issues/16259
When controller URL is specified in the JDBC driver, automatic broker selection is not utilized, which can be simply fixed with ConnectionFactory: ``` --- a/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotConnection.java +++ b/pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotConnection.java @@ -59,13 +59,12 @@ public class PinotConnection extends AbstractBaseConnection { } else { _controllerTransport = controllerTransport; } - List<String> brokers; if (properties.containsKey(BROKER_LIST)) { - brokers = Arrays.asList(properties.getProperty(BROKER_LIST).split(";")); + List<String> brokers = Arrays.asList(properties.getProperty(BROKER_LIST).split(";")); + _session = ConnectionFactory.fromHostList(properties, brokers, transport); } else { - brokers = getBrokerList(controllerURL, tenant); + _session = ConnectionFactory.fromController(properties, _controllerURL, transport); } - _session = new org.apache.pinot.client.Connection(properties, brokers, transport); for (Map.Entry<Object, Object> property : properties.entrySet()) { String configKey = QueryOptionsUtils.resolveCaseInsensitiveKey(property.getKey()); @@ -84,12 +83,6 @@ public class PinotConnection extends AbstractBaseConnection { return _queryOptions; } - private List<String> getBrokerList(String controllerURL, String tenant) { - ControllerTenantBrokerResponse controllerTenantBrokerResponse = - _controllerTransport.getBrokersFromController(controllerURL, tenant); - return controllerTenantBrokerResponse.getBrokers(); - } - @Override protected void validateState() throws SQLException { ``` But maybe I'm missing some bigger picture in why this has not been done here? Are the brokers typically refreshed using some other mechanism when JDBC is involved? -- 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.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