protected static class LaunchRequestTransition implements
SingleArcTransition<AMContainerImpl, AMContainerEvent> {
@Override
public void transition(AMContainerImpl container, AMContainerEvent cEvent) {
AMContainerEventLaunchRequest event = (AMContainerEventLaunchRequest) cEvent;
ContainerContext containerContext = event.getContainerContext();
container.clc = AMContainerHelpers.createContainerLaunchContext(
container.appContext.getCurrentDAGID(),
container.appContext.getApplicationACLs(),
container.getContainerId(),
containerContext.getLocalResources(),
containerContext.getEnvironment(),
containerContext.getJavaOpts(),
container.taskAttemptListener, containerContext.getCredentials(),
event.shouldProfile(), container.appContext);
// Registering now, so that in case of delayed NM response, the child
// task is not told to die since the TAL does not know about the container.
container.registerWithTAListener();