clintropolis commented on a change in pull request #6272: Add suspend|resume|terminate all supervisors endpoints. URL: https://github.com/apache/incubator-druid/pull/6272#discussion_r219367890
########## File path: indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java ########## @@ -260,6 +260,39 @@ public Response terminate(@PathParam("id") final String id) ); } + @POST + @Path("/suspendAll") + @Produces(MediaType.APPLICATION_JSON) + public Response specSuspendAll() + { + return specSuspendAllOrResumeAll(true); + } + + @POST + @Path("/resumeAll") + @Produces(MediaType.APPLICATION_JSON) + public Response specResumeAll() + { + return specSuspendAllOrResumeAll(false); + } + + @POST + @Path("/terminateAll") + @Produces(MediaType.APPLICATION_JSON) + public Response terminateAll() + { + return asLeaderWithSupervisorManager( + manager -> { + Set<String> supervisorIds = manager.getSupervisorIds(); Review comment: I think this should be pushed down into `SupervisorManager` into a `terminateAll` method. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org