MAPREDUCE-6492. AsyncDispatcher exit with NPE on TaskAttemptImpl#sendJHStartEventForAssignedFailTask. Contributed by Bibin A Chundatt

This commit is contained in:
Jason Lowe 2015-09-28 22:12:03 +00:00
parent e5992ef4df
commit ab11085b81
3 changed files with 15 additions and 1 deletions

View File

@ -626,6 +626,10 @@ Release 2.7.2 - UNRELEASED
MAPREDUCE-5982. Task attempts that fail from the ASSIGNED state can
disappear (Chang Li via jlowe)
MAPREDUCE-6492. AsyncDispatcher exit with NPE on
TaskAttemptImpl#sendJHStartEventForAssignedFailTask (Bibin A Chundatt via
jlowe)
Release 2.7.1 - 2015-07-06
INCOMPATIBLE CHANGES

View File

@ -1486,7 +1486,9 @@ public abstract class TaskAttemptImpl implements
private static void
sendJHStartEventForAssignedFailTask(TaskAttemptImpl taskAttempt) {
TaskAttemptContainerLaunchedEvent event;
if (null == taskAttempt.container) {
return;
}
taskAttempt.launchTime = taskAttempt.clock.getTime();
InetSocketAddress nodeHttpInetAddr =

View File

@ -774,6 +774,14 @@ public class TestTaskAttempt{
assertFalse(
"InternalError occurred trying to handle TA_DIAGNOSTICS_UPDATE on assigned task",
eventHandler.internalError);
try {
taImpl.handle(new TaskAttemptEvent(attemptId,
TaskAttemptEventType.TA_KILL));
Assert.assertTrue("No exception on UNASSIGNED STATE KILL event", true);
} catch (Exception e) {
Assert.assertFalse(
"Exception not expected for UNASSIGNED STATE KILL event", true);
}
}
@Test