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:
parent
b93abdcd66
commit
c1e333f32f
|
@ -1853,6 +1853,9 @@ Release 0.23.0 - Unreleased
|
||||||
MAPREDUCE-3304. Fixed intermittent test failure due to a race in
|
MAPREDUCE-3304. Fixed intermittent test failure due to a race in
|
||||||
TestRMContainerAllocator#testBlackListedNodes. (Ravi Prakash via acmurthy)
|
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
|
Release 0.22.0 - Unreleased
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -61,6 +61,7 @@ public class ApplicationImpl implements Application {
|
||||||
final String user;
|
final String user;
|
||||||
final ApplicationId appId;
|
final ApplicationId appId;
|
||||||
final Credentials credentials;
|
final Credentials credentials;
|
||||||
|
Map<ApplicationAccessType, String> applicationACLs;
|
||||||
final ApplicationACLsManager aclsManager;
|
final ApplicationACLsManager aclsManager;
|
||||||
private final ReadLock readLock;
|
private final ReadLock readLock;
|
||||||
private final WriteLock writeLock;
|
private final WriteLock writeLock;
|
||||||
|
@ -200,8 +201,8 @@ public class ApplicationImpl implements Application {
|
||||||
@Override
|
@Override
|
||||||
public void transition(ApplicationImpl app, ApplicationEvent event) {
|
public void transition(ApplicationImpl app, ApplicationEvent event) {
|
||||||
ApplicationInitEvent initEvent = (ApplicationInitEvent)event;
|
ApplicationInitEvent initEvent = (ApplicationInitEvent)event;
|
||||||
app.aclsManager.addApplication(app.getAppId(), initEvent
|
app.applicationACLs = initEvent.getApplicationACLs();
|
||||||
.getApplicationACLs());
|
app.aclsManager.addApplication(app.getAppId(), app.applicationACLs);
|
||||||
app.dispatcher.getEventHandler().handle(
|
app.dispatcher.getEventHandler().handle(
|
||||||
new ApplicationLocalizationEvent(
|
new ApplicationLocalizationEvent(
|
||||||
LocalizationEventType.INIT_APPLICATION_RESOURCES, app));
|
LocalizationEventType.INIT_APPLICATION_RESOURCES, app));
|
||||||
|
@ -248,15 +249,11 @@ public class ApplicationImpl implements Application {
|
||||||
@Override
|
@Override
|
||||||
public void transition(ApplicationImpl app, ApplicationEvent event) {
|
public void transition(ApplicationImpl app, ApplicationEvent event) {
|
||||||
|
|
||||||
Map<ApplicationAccessType, String> appAcls =
|
|
||||||
app.getContainers().values().iterator().next().getLaunchContext()
|
|
||||||
.getApplicationACLs();
|
|
||||||
|
|
||||||
// Inform the logAggregator
|
// Inform the logAggregator
|
||||||
app.dispatcher.getEventHandler().handle(
|
app.dispatcher.getEventHandler().handle(
|
||||||
new LogAggregatorAppStartedEvent(app.appId, app.user,
|
new LogAggregatorAppStartedEvent(app.appId, app.user,
|
||||||
app.credentials, ContainerLogsRetentionPolicy.ALL_CONTAINERS,
|
app.credentials, ContainerLogsRetentionPolicy.ALL_CONTAINERS,
|
||||||
appAcls));
|
app.applicationACLs));
|
||||||
|
|
||||||
// Start all the containers waiting for ApplicationInit
|
// Start all the containers waiting for ApplicationInit
|
||||||
for (Container container : app.containers.values()) {
|
for (Container container : app.containers.values()) {
|
||||||
|
|
Loading…
Reference in New Issue