yingdachen commented on a change in pull request #37: TEZ-4042: Speculative 
attempts should avoid running on the same node
URL: https://github.com/apache/tez/pull/37#discussion_r258243458
 
 

 ##########
 File path: tez-dag/src/main/java/org/apache/tez/dag/app/dag/impl/TaskImpl.java
 ##########
 @@ -1009,14 +1014,18 @@ public TaskStateInternal transition(TaskImpl task, 
TaskEvent event) {
     public void transition(TaskImpl task, TaskEvent event) {
       LOG.info("Scheduling a redundant attempt for task " + task.taskId);
       task.counters.findCounter(TaskCounter.NUM_SPECULATIONS).increment(1);
-      TezTaskAttemptID earliestUnfinishedAttempt = null;
+      TaskAttempt earliestUnfinishedAttempt = null;
       for (TaskAttempt ta : task.attempts.values()) {
         // find the oldest running attempt
         if (!ta.isFinished()) {
-          earliestUnfinishedAttempt = ta.getID();
+          earliestUnfinishedAttempt = ta;
         }
       }
-      task.addAndScheduleAttempt(earliestUnfinishedAttempt);
+      NodeId nodeId = earliestUnfinishedAttempt.getNodeId();
+      task.unhealthyNodesHistory.add(nodeId);
 
 Review comment:
   a piece of thought for discussions: in the loop above (line 1018-1021), 
should we put the node id of ALL running attempts here into unhealthy nodes 
(instead of just the earliest attempt)?  since by the time we got here, a 
redundant attempt was deemed necessary, that must be suggesting all the 
unfinished(running) attempts for this task are potentially 
problematic/long-tailed.

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

Reply via email to