sanha commented on a change in pull request #15: [NEMO-52] Make 
SchedulingPolicy Stackable
URL: https://github.com/apache/incubator-nemo/pull/15#discussion_r187832341
 
 

 ##########
 File path: 
runtime/master/src/main/java/edu/snu/nemo/runtime/master/scheduler/SchedulingPolicy.java
 ##########
 @@ -29,61 +28,9 @@
  */
 @DriverSide
 @ThreadSafe
-@DefaultImplementation(SourceLocationAwareSchedulingPolicy.class)
+@FunctionalInterface
+@DefaultImplementation(CompositeSchedulingPolicy.class)
 public interface SchedulingPolicy {
-
-  /**
-   * Attempts to schedule the given taskGroup to an executor according to this 
policy.
-   * If there is no executor available for the taskGroup, it waits for an 
executor to be assigned before it times out.
-   * (Depending on the executor's resource type)
-   *
-   * @param scheduledTaskGroup to schedule.
-   * @param jobStateManager jobStateManager which the TaskGroup belongs to.
-   * @return true if the task group is successfully scheduled, false otherwise.
-   */
-  boolean scheduleTaskGroup(final ScheduledTaskGroup scheduledTaskGroup, final 
JobStateManager jobStateManager);
-
-  /**
-   * Adds the executorId to the pool of available executors.
-   * Unlocks this policy to schedule a next taskGroup if locked.
-   * (Depending on the executor's resource type)
-   *
-   * @param executorRepresenter for the executor that has been added.
-   */
-  void onExecutorAdded(ExecutorRepresenter executorRepresenter);
-
-  /**
-   * Deletes the executorId from the pool of available executors.
-   * Locks this policy from scheduling if there is no more executor currently 
available for the next taskGroup.
-   * (Depending on the executor's resource type)
-   *
-   * @param executorId for the executor that has been deleted.
-   * @return the ids of the set of task groups that were running on the 
executor.
-   */
-  Set<String> onExecutorRemoved(String executorId);
-
-  /**
-   * Marks the taskGroup's completion in the executor.
-   * Unlocks this policy to schedule a next taskGroup if locked.
-   * (Depending on the executor's resource type)
-   *
-   * @param executorId of the executor where the taskGroup's execution has 
completed.
-   * @param taskGroupId whose execution has completed.
-   */
-  void onTaskGroupExecutionComplete(String executorId, String taskGroupId);
-
-  /**
-   * Marks the taskGroup's failure in the executor.
-   * Unlocks this policy to reschedule this taskGroup if locked.
-   * (Depending on the executor's resource type)
-   *
-   * @param executorId of the executor where the taskGroup's execution has 
failed.
-   * @param taskGroupId whose execution has completed.
-   */
-  void onTaskGroupExecutionFailed(String executorId, String taskGroupId);
-
-  /**
-   * End of scheduling.
-   */
-  void terminate();
+  Set<ExecutorRepresenter> filterExecutorRepresenters(final 
Set<ExecutorRepresenter> executorRepresenterList,
 
 Review comment:
   Please add a comment for this method (and all others if omitted).

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

Reply via email to