tez-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] yingdachen commented on a change in pull request #37: TEZ-4042: Speculative attempts should avoid running on the same node
Date Wed, 20 Feb 2019 20:26:42 GMT
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_r258660644
 
 

 ##########
 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:
   Indeed, the default speculator enforces that only one speculative attempt is allowed today,
but i would still think including all running nodes here would be slightly better:
   
   1. with only one speculation allowed, there can be one running attempts above when we got
here, so just adding its node to unhealthyNodeHistory is equivalent to adding the earliestUnfinishedAttempt's
node.
   2.  the fact that there can be only one speculative today, should be orthogonal to our
desire to avoid using the same (possibly problematic) nodes for speculative attempt, therefore
syntax wise, I think adding all running nodes (at the time when we are adding additional speculative
attempt) to unhealthy history would make more sense, and it would be extensible too in the
future, if we decide that having more than one speculative should be allowed.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message