MAPREDUCE-5009. Killing the Task Attempt slated for commit does not clear the value from the Task commitAttempt member (Robert Parker via jeagles)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1447965 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1c49e77998
commit
c8f35bc3d2
@ -723,6 +723,10 @@ Release 0.23.7 - UNRELEASED
|
||||
MAPREDUCE-4992. AM hangs in RecoveryService when recovering tasks with
|
||||
speculative attempts (Robert Parker via jlowe)
|
||||
|
||||
MAPREDUCE-5009. Killing the Task Attempt slated for commit does not clear
|
||||
the value from the Task commitAttempt member (Robert Parker via jeagles)
|
||||
|
||||
|
||||
Release 0.23.6 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -857,6 +857,9 @@ public void transition(TaskImpl task, TaskEvent event) {
|
||||
if (task.successfulAttempt == null) {
|
||||
task.addAndScheduleAttempt(Avataar.VIRGIN);
|
||||
}
|
||||
if ((task.commitAttempt != null) && (task.commitAttempt == taskAttemptId)) {
|
||||
task.commitAttempt = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -491,7 +491,25 @@ public void testTaskProgress() {
|
||||
assert(mockTask.getProgress() == progress);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testKillDuringTaskAttemptCommit() {
|
||||
mockTask = createMockTask(TaskType.REDUCE);
|
||||
TaskId taskId = getNewTaskID();
|
||||
scheduleTaskAttempt(taskId);
|
||||
|
||||
launchTaskAttempt(getLastAttempt().getAttemptId());
|
||||
updateLastAttemptState(TaskAttemptState.COMMIT_PENDING);
|
||||
commitTaskAttempt(getLastAttempt().getAttemptId());
|
||||
|
||||
TaskAttemptId commitAttempt = getLastAttempt().getAttemptId();
|
||||
updateLastAttemptState(TaskAttemptState.KILLED);
|
||||
killRunningTaskAttempt(commitAttempt);
|
||||
|
||||
assertFalse(mockTask.canCommit(commitAttempt));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testFailureDuringTaskAttemptCommit() {
|
||||
mockTask = createMockTask(TaskType.MAP);
|
||||
|
Loading…
Reference in New Issue
Block a user