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_r219368457
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/overlord/supervisor/SupervisorResource.java
 ##########
 @@ -398,4 +431,31 @@ private Response specSuspendOrResume(final String id, 
boolean suspend)
         }
     );
   }
+
+  private Response specSuspendAllOrResumeAll(boolean suspend)
+  {
+    return asLeaderWithSupervisorManager(
+        manager -> {
+          Set<String> supervisorIds = manager.getSupervisorIds();
 
 Review comment:
   Additionally, for a hypothetical `suspendOrResumeAllSupervisors` method,  it 
might also be nice to extract the actual logic from `suspendOrResumeSupervisor` 
into another method, `possiblySuspendOrResumeSupervisor` that doesn't have the 
precondition checks, similar to the function of 
`possiblyStopAndRemoveSupervisorInternal`, and call that method from both 
`suspendOrResumeSupervisor` and `suspendOrResumeSupervisors`.

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


With regards,
Apache Git Services

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

Reply via email to