YARN-2856. Fixed RMAppImpl to handle ATTEMPT_KILLED event at ACCEPTED state on app recovery. Contributed by Rohith Sharmaks
This commit is contained in:
parent
1a2e5cbc4d
commit
d005404ef7
@ -84,6 +84,9 @@ Release 2.7.0 - UNRELEASED
|
||||
YARN-2766. Made ApplicationHistoryManager return a sorted list of apps,
|
||||
attempts and containers. (Robert Kanter via zjshen)
|
||||
|
||||
YARN-2856. Fixed RMAppImpl to handle ATTEMPT_KILLED event at ACCEPTED state
|
||||
on app recovery. (Rohith Sharmaks via jianhe)
|
||||
|
||||
Release 2.6.0 - 2014-11-18
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -229,6 +229,9 @@ RMAppEventType.MOVE, new RMAppMoveTransition())
|
||||
new FinalSavingTransition(FINISHED_TRANSITION, RMAppState.FINISHED))
|
||||
.addTransition(RMAppState.ACCEPTED, RMAppState.KILLING,
|
||||
RMAppEventType.KILL, new KillAttemptTransition())
|
||||
.addTransition(RMAppState.ACCEPTED, RMAppState.FINAL_SAVING,
|
||||
RMAppEventType.ATTEMPT_KILLED,
|
||||
new FinalSavingTransition(new AppKilledTransition(), RMAppState.KILLED))
|
||||
.addTransition(RMAppState.ACCEPTED, RMAppState.ACCEPTED,
|
||||
RMAppEventType.APP_RUNNING_ON_NODE,
|
||||
new AppRunningOnNodeTransition())
|
||||
|
@ -714,6 +714,29 @@ public void testAppAcceptedKill() throws IOException, InterruptedException {
|
||||
verifyApplicationFinished(RMAppState.KILLED);
|
||||
verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAppAcceptedAttemptKilled() throws IOException,
|
||||
InterruptedException {
|
||||
LOG.info("--- START: testAppAcceptedAttemptKilled ---");
|
||||
RMApp application = testCreateAppAccepted(null);
|
||||
|
||||
// ACCEPTED => FINAL_SAVING event RMAppEventType.ATTEMPT_KILLED
|
||||
// When application recovery happens for attempt is KILLED but app is
|
||||
// RUNNING.
|
||||
RMAppEvent event =
|
||||
new RMAppEvent(application.getApplicationId(),
|
||||
RMAppEventType.ATTEMPT_KILLED);
|
||||
application.handle(event);
|
||||
rmDispatcher.await();
|
||||
|
||||
assertAppState(RMAppState.FINAL_SAVING, application);
|
||||
sendAppUpdateSavedEvent(application);
|
||||
assertKilled(application);
|
||||
assertAppFinalStateSaved(application);
|
||||
verifyApplicationFinished(RMAppState.KILLED);
|
||||
verifyAppRemovedSchedulerEvent(RMAppState.KILLED);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAppRunningKill() throws IOException {
|
||||
|
Loading…
Reference in New Issue
Block a user