YARN-2823. Fixed ResourceManager app-attempt state machine to inform schedulers about previous finished attempts of a running appliation to avoid expectation mismatch w.r.t transferred containers. Contributed by Jian He.
This commit is contained in:
parent
42bbe3794e
commit
a5657182a7
@ -888,6 +888,10 @@ Release 2.6.0 - UNRELEASED
|
||||
YARN-2744. Fixed CapacityScheduler to validate node-labels correctly against
|
||||
queues. (Wangda Tan via vinodkv)
|
||||
|
||||
YARN-2823. Fixed ResourceManager app-attempt state machine to inform
|
||||
schedulers about previous finished attempts of a running appliation to avoid
|
||||
expectation mismatch w.r.t transferred containers. (Jian He via vinodkv)
|
||||
|
||||
Release 2.5.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
@ -1021,6 +1021,10 @@ public RMAppAttemptState transition(RMAppAttemptImpl appAttempt,
|
||||
// state but application is not in final state.
|
||||
if (rmApp.getCurrentAppAttempt() == appAttempt
|
||||
&& !RMAppImpl.isAppInFinalState(rmApp)) {
|
||||
// Add the previous finished attempt to scheduler synchronously so
|
||||
// that scheduler knows the previous attempt.
|
||||
appAttempt.scheduler.handle(new AppAttemptAddedSchedulerEvent(
|
||||
appAttempt.getAppAttemptId(), false, true));
|
||||
(new BaseFinalTransition(appAttempt.recoveredFinalState)).transition(
|
||||
appAttempt, event);
|
||||
}
|
||||
|
@ -440,7 +440,10 @@ public void testRMRestartAppRunningAMFailed() throws Exception {
|
||||
nm1.registerNode();
|
||||
|
||||
// create app and launch the AM
|
||||
RMApp app0 = rm1.submitApp(200);
|
||||
RMApp app0 =
|
||||
rm1.submitApp(200, "name", "user",
|
||||
new HashMap<ApplicationAccessType, String>(), false, "default", -1,
|
||||
null, "MAPREDUCE", true, true);
|
||||
MockAM am0 = launchAM(app0, rm1, nm1);
|
||||
|
||||
// fail the AM by sending CONTAINER_FINISHED event without registering.
|
||||
|
Loading…
Reference in New Issue
Block a user