klsince commented on code in PR #9171: URL: https://github.com/apache/pinot/pull/9171#discussion_r944943237
########## pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java: ########## @@ -167,6 +182,60 @@ private String getDefaultBrokerId() { } } + @Override + public Map<Long, String> getRunningQueries() { + return _queriesById.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue()._query)); + } + + @VisibleForTesting + Set<ServerInstance> getRunningServers(long queryId) { + if (_queriesById.isEmpty()) { + return Collections.emptySet(); + } + return _queriesById.get(queryId)._servers; Review Comment: good catch. it could happen, but this method was added for testing purpose. will make it safer -- 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