YARN-5049. Addendum patch for branch-2. (asuresh)

(cherry picked from commit c153bed6e3)
This commit is contained in:
Arun Suresh 2017-11-12 10:16:00 -08:00
parent 45c5b7f71d
commit 238a70c6c3
1 changed files with 1 additions and 8 deletions

View File

@ -465,20 +465,13 @@ public class ContainerManagerImpl extends CompositeService implements
Application app = context.getApplications().get(appId);
if (app != null) {
Credentials credentials =
YarnServerSecurityUtils.parseCredentials(launchContext);
Container container = new ContainerImpl(getConfig(), dispatcher,
req.getContainerLaunchContext(),
credentials, metrics, token, context, rcs);
context.getContainers().put(containerId, container);
app.handle(new ApplicationContainerInitEvent(container));
recoverActiveContainer(launchContext, token, rcs);
if (rcs.getRecoveryType() == RecoveredContainerType.KILL) {
dispatcher.getEventHandler().handle(
new ContainerKillEvent(containerId, ContainerExitStatus.ABORTED,
"Due to invalid StateStore info container was killed"
+ " during recovery"));
}
recoverActiveContainer(launchContext, token, rcs);
} else {
if (rcs.getStatus() != RecoveredContainerStatus.COMPLETED) {
LOG.warn(containerId + " has no corresponding application!");