tibrewalpratik17 commented on code in PR #12201:
URL: https://github.com/apache/pinot/pull/12201#discussion_r1439256245


##########
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:
   This might not give `Optional.empty()` when tableName is empty which should 
be the desired behaviour here. You can modify it to - `tableName.equals("") ? 
Optional.empty() : Optional.of(tableName)` ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to