QiuMM 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_r220605152
 
 

 ##########
 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:
   > return a list of supervisor ids that had a state change
   I think there is no need to return these ids since these `all` endpoints are 
idempotent operations. Just return OK would be fine. And I think users do not 
care about which supervisor has a state change, they just need to know they 
have changed all supervisors to suspened state or running state. Besides, 
return these ids would make the code a little complex and ugly ):

----------------------------------------------------------------
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