chenboat commented on a change in pull request #7556:
URL: https://github.com/apache/pinot/pull/7556#discussion_r739537928
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableInstances.java
##########
@@ -113,4 +114,27 @@ public String getTableInstances(
ret.set("server", servers); // Keeping compatibility with previous API,
so "server" and "brokers"
return ret.toString();
}
+
+ @GET
+ @Path("/tables/{tableNameWithType}/livebrokers")
+ @Produces(MediaType.APPLICATION_JSON)
+ @ApiOperation(value = "List the brokers serving a table", notes = "List live
brokers of the given table based on EV")
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Success"),
+ @ApiResponse(code = 404, message = "Table not found"),
+ @ApiResponse(code = 500, message = "Internal server error")})
+ public String getLiveBrokersForTable(
+ @ApiParam(value = "Table name with type", required = true)
+ @PathParam("tableNameWithType") String tableNameWithType) {
+ ObjectNode ret = JsonUtils.newObjectNode();
+ ret.put("tableName", tableNameWithType);
+ List<String> liveBrokersForTable =
_pinotHelixResourceManager.getLiveBrokersForTable(tableNameWithType);
Review comment:
done.
--
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]