MAPREDUCE-6711. JobImpl fails to handle preemption events on state COMMITTING. Contributed by Prabhu Joseph.
This commit is contained in:
parent
ac16400e1f
commit
679478d0c6
@ -419,7 +419,9 @@ JobEventType.JOB_KILL, new KillTasksTransition())
|
||||
.addTransition(JobStateInternal.COMMITTING,
|
||||
JobStateInternal.COMMITTING,
|
||||
EnumSet.of(JobEventType.JOB_UPDATED_NODES,
|
||||
JobEventType.JOB_TASK_ATTEMPT_FETCH_FAILURE))
|
||||
JobEventType.JOB_TASK_ATTEMPT_FETCH_FAILURE,
|
||||
JobEventType.JOB_TASK_ATTEMPT_COMPLETED,
|
||||
JobEventType.JOB_MAP_TASK_RESCHEDULED))
|
||||
|
||||
// Transitions from SUCCEEDED state
|
||||
.addTransition(JobStateInternal.SUCCEEDED, JobStateInternal.SUCCEEDED,
|
||||
|
@ -218,6 +218,14 @@ public void testCheckJobCompleteSuccess() throws Exception {
|
||||
completeJobTasks(job);
|
||||
assertJobState(job, JobStateInternal.COMMITTING);
|
||||
|
||||
job.handle(new JobEvent(job.getID(),
|
||||
JobEventType.JOB_TASK_ATTEMPT_COMPLETED));
|
||||
assertJobState(job, JobStateInternal.COMMITTING);
|
||||
|
||||
job.handle(new JobEvent(job.getID(),
|
||||
JobEventType.JOB_MAP_TASK_RESCHEDULED));
|
||||
assertJobState(job, JobStateInternal.COMMITTING);
|
||||
|
||||
// let the committer complete and verify the job succeeds
|
||||
syncBarrier.await();
|
||||
assertJobState(job, JobStateInternal.SUCCEEDED);
|
||||
|
Loading…
Reference in New Issue
Block a user