SingleArcTransition<AMContainerImpl, AMContainerEvent> {
@Override
public void transition(AMContainerImpl container, AMContainerEvent cEvent) {
AMContainerEventLaunchRequest event = (AMContainerEventLaunchRequest) cEvent;
ContainerContext containerContext = event.getContainerContext();
// Clone - don't use the object that is passed in, since this is likely to
// be modified here.
container.containerLocalResources = new HashMap<String, LocalResource>(
containerContext.getLocalResources());
container.credentials = containerContext.getCredentials();
container.credentialsChanged = true;
ContainerLaunchContext clc = AMContainerHelpers.createContainerLaunchContext(
container.appContext.getCurrentDAGID(),
container.appContext.getApplicationACLs(),
container.getContainerId(),
containerContext.getLocalResources(),
containerContext.getEnvironment(),
containerContext.getJavaOpts(),
container.taskAttemptListener.getAddress(), containerContext.getCredentials(),
container.shouldProfile, container.profileJavaOpts, 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();