MAPREDUCE-3306. Fixed a bug in NodeManager ApplicationImpl that was causing NodeManager to crash. (vinodkv)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1190523 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2011-10-28 19:45:57 +00:00
parent b93abdcd66
commit c1e333f32f
2 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -61,6 +61,7 @@ public class ApplicationImpl implements Application {
final String user;
final ApplicationId appId;
final Credentials credentials;
Map<ApplicationAccessType, String> 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<ApplicationAccessType, String> 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()) {