YARN-4520. Finished app info is unnecessarily persisted in NM state-store if container is acquired but not lunched on this node. Contributed by sandflee

This commit is contained in:
Jian He 2016-01-25 15:35:51 -08:00
parent 435b6ae82b
commit 389a7fb33f
2 changed files with 9 additions and 0 deletions

View File

@ -1172,6 +1172,9 @@ Release 2.8.0 - UNRELEASED
YARN-4592. Remove unused GetContainerStatus proto. (Chang Li via aajisaka) YARN-4592. Remove unused GetContainerStatus proto. (Chang Li via aajisaka)
YARN-4520. Finished app info is unnecessarily persisted in NM state-store
if container is acquired but not lunched on this node. (sandflee via jianeh)
Release 2.7.3 - UNRELEASED Release 2.7.3 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -1310,6 +1310,12 @@ public class ContainerManagerImpl extends CompositeService implements
CMgrCompletedAppsEvent appsFinishedEvent = CMgrCompletedAppsEvent appsFinishedEvent =
(CMgrCompletedAppsEvent) event; (CMgrCompletedAppsEvent) event;
for (ApplicationId appID : appsFinishedEvent.getAppsToCleanup()) { for (ApplicationId appID : appsFinishedEvent.getAppsToCleanup()) {
Application app = this.context.getApplications().get(appID);
if (app == null) {
LOG.warn("couldn't find application " + appID + " while processing"
+ " FINISH_APPS event");
continue;
}
String diagnostic = ""; String diagnostic = "";
if (appsFinishedEvent.getReason() == CMgrCompletedAppsEvent.Reason.ON_SHUTDOWN) { if (appsFinishedEvent.getReason() == CMgrCompletedAppsEvent.Reason.ON_SHUTDOWN) {
diagnostic = "Application killed on shutdown"; diagnostic = "Application killed on shutdown";