Ethanlm commented on a change in pull request #3222: STORM-3596 use send 
assignment status in blacklist scheduling
URL: https://github.com/apache/storm/pull/3222#discussion_r405242762
 
 

 ##########
 File path: 
storm-server/src/main/java/org/apache/storm/scheduler/IScheduler.java
 ##########
 @@ -45,4 +45,14 @@
      */
     default void cleanup() {
     }
+
+    /**
+     * Provide feedback to the scheduler if assignments were sent successfully 
or not to a given node.  This
+     * information can be used for blacklisting.
+     *
+     *@param node the node that assignments were sent to.
+     *@param successful indicate if the assignment was sent successfully.
+     */
+    default void nodeAssignmentSent(String node, boolean successful) {
 
 Review comment:
   I think using another interface might be more general.
   
   For example,  we can have an interface
   ```
   public interface INodeAssignmentSentCallBack {
       void nodeAssignmentSent(String node, boolean successful);
   }
   ```
   Then have IScheduler to extends that interface. 
   
   And in AssignmentDistributionService, it doesn't take an IScheduler as an 
paramter. Instead, 
   
   ```
    public static AssignmentDistributionService getInstance(Map conf, 
INodeAssignmentSentCallBack callback) {
   ```
   
   We can still pass an IScheduler to it. But it purely servers as a purpose of 
`INodeAssignmentSentCallBack`, which looks cleaner and more general to me. What 
do you think?
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to