abhioncbr commented on code in PR #10692: URL: https://github.com/apache/pinot/pull/10692#discussion_r1183182303
########## pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/DynamicBrokerSelector.java: ########## @@ -86,24 +87,20 @@ private void refresh() { @Nullable @Override - public String selectBroker(String table) { - if (table != null) { - String tableName = - table.replace(ExternalViewReader.OFFLINE_SUFFIX, "").replace(ExternalViewReader.REALTIME_SUFFIX, ""); - List<String> list = _tableToBrokerListMapRef.get().get(tableName); - if (list != null && !list.isEmpty()) { - return list.get(RANDOM.nextInt(list.size())); - } - // In case tableName is formatted as <db>.<table> - int idx = tableName.indexOf('.'); - if (idx > 0) { - tableName = tableName.substring(idx + 1); + public String selectBroker(List<String> tableNames) { + if (tableNames != null) { + List<List<String>> commonBrokers = new ArrayList<>(); Review Comment: The same happens `BrokerSelectorUtils.getTablesCommonBrokers` method. Let me know, if you want me to bring the logic here itself. -- 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