diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 59b90c53f1..16f5704172 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1853,6 +1853,9 @@ Release 0.23.0 - Unreleased MAPREDUCE-3304. Fixed intermittent test failure due to a race in TestRMContainerAllocator#testBlackListedNodes. (Ravi Prakash via acmurthy) + MAPREDUCE-3306. Fixed a bug in NodeManager ApplicationImpl that was causing + NodeManager to crash. (vinodkv) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java index 7bde81f380..d1914b5f61 100644 --- a/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java +++ b/hadoop-mapreduce-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/application/ApplicationImpl.java @@ -61,6 +61,7 @@ public class ApplicationImpl implements Application { final String user; final ApplicationId appId; final Credentials credentials; + Map applicationACLs; final ApplicationACLsManager aclsManager; private final ReadLock readLock; private final WriteLock writeLock; @@ -200,8 +201,8 @@ static class AppInitTransition implements @Override public void transition(ApplicationImpl app, ApplicationEvent event) { ApplicationInitEvent initEvent = (ApplicationInitEvent)event; - app.aclsManager.addApplication(app.getAppId(), initEvent - .getApplicationACLs()); + app.applicationACLs = initEvent.getApplicationACLs(); + app.aclsManager.addApplication(app.getAppId(), app.applicationACLs); app.dispatcher.getEventHandler().handle( new ApplicationLocalizationEvent( LocalizationEventType.INIT_APPLICATION_RESOURCES, app)); @@ -248,15 +249,11 @@ static class AppInitDoneTransition implements @Override public void transition(ApplicationImpl app, ApplicationEvent event) { - Map appAcls = - app.getContainers().values().iterator().next().getLaunchContext() - .getApplicationACLs(); - // Inform the logAggregator app.dispatcher.getEventHandler().handle( new LogAggregatorAppStartedEvent(app.appId, app.user, app.credentials, ContainerLogsRetentionPolicy.ALL_CONTAINERS, - appAcls)); + app.applicationACLs)); // Start all the containers waiting for ApplicationInit for (Container container : app.containers.values()) {