sanha commented on a change in pull request #1: [NEMO-26] Implement 
SourceLocationAwareSchedulingPolicy
URL: https://github.com/apache/incubator-nemo/pull/1#discussion_r173046029
 
 

 ##########
 File path: 
runtime/master/src/main/java/edu/snu/nemo/runtime/master/scheduler/RoundRobinSchedulingPolicy.java
 ##########
 @@ -70,26 +69,19 @@
    */
   private final Map<String, List<String>> executorIdByContainerType;
 
-  /**
-   * A copy of {@link ContainerManager#executorRepresenterMap}.
-   * This cached copy is updated when an executor is added or removed.
-   */
-  private final Map<String, ExecutorRepresenter> executorRepresenterMap;
-
   /**
    * The index of the next executor to be assigned for each container type.
    * This map allows the executor index computation of the RR scheduling.
    */
   private final Map<String, Integer> nextExecutorIndexByContainerType;
 
   @Inject
-  public RoundRobinSchedulingPolicy(final ContainerManager containerManager,
+  public RoundRobinSchedulingPolicy(final ExecutorRegistry executorRegistry,
                                     
@Parameter(JobConf.SchedulerTimeoutMs.class) final int scheduleTimeoutMs) {
-    this.containerManager = containerManager;
     this.scheduleTimeoutMs = scheduleTimeoutMs;
+    this.executorRegistry = executorRegistry;
     this.lock = new ReentrantLock();
     this.executorIdByContainerType = new HashMap<>();
-    this.executorRepresenterMap = new HashMap<>();
     this.conditionByContainerType = new HashMap<>();
 
 Review comment:
   Can't we have a single condition for every container types like 
`SourceLocationAwareSchedulingPolicy`?
   It seems not good to wait specific container type even though another type 
of container becomes available. 

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