Chyler 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_r258765563
##########
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:
Thanks for your review, sounds very thoughtful, I'd add all running nodes to
unhealthy history.
----------------------------------------------------------------
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