cypherean commented on code in PR #12201: URL: https://github.com/apache/pinot/pull/12201#discussion_r1439270762
########## pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableInstances.java: ########## @@ -159,9 +161,11 @@ public List<String> getLiveBrokersForTable( @ApiResponses(value = { @ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 500, message = "Internal server error") }) - public Map<String, List<InstanceInfo>> getLiveBrokers() { + public Map<String, List<InstanceInfo>> getLiveBrokers( + @ApiParam(value = "Table name (with or without type)", required = false) @DefaultValue("") + @QueryParam("tableName") String tableName) { try { - return _pinotHelixResourceManager.getTableToLiveBrokersMapping(); + return _pinotHelixResourceManager.getTableToLiveBrokersMapping(Optional.of(tableName)); Review Comment: The check `if (optionalTableName.isPresent() && !optionalTableName.get().isEmpty())` in `getTableToLiveBrokersMapping` checks if the tableName string is empty. Added a test case for the same. -- 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