Examples of ContainerContext


Examples of org.apache.tez.dag.app.ContainerContext

      reset(eventHandler);
      @SuppressWarnings("unchecked")
      Token<JobTokenIdentifier> jobToken = mock(Token.class);
      TokenCache.setSessionToken(jobToken, credentials);
      amContainer.handle(new AMContainerEventLaunchRequest(containerID, vertexID,
          new ContainerContext(localResources, credentials, new HashMap<String, String>(), "")));
    }
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

  }
 
  @Override
  public boolean isSuperSet(Object cs1, Object cs2) {
    checkArguments(cs1, cs2);
    ContainerContext context1 = (ContainerContext) cs1;
    ContainerContext context2 = (ContainerContext) cs2;

    return context1.isSuperSet(context2);
  }
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

  }

  @Override
  public boolean isExactMatch(Object cs1, Object cs2) {
    checkArguments(cs1, cs2);
    ContainerContext context1 = (ContainerContext) cs1;
    ContainerContext context2 = (ContainerContext) cs2;

    return context1.isExactMatch(context2);
  }
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

      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.appContext, container.container.getResource(),
          container.appContext.getAMConf());

      // 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.
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

      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();
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

        .createEnvironmentMapFromDAGPlan(vertexPlan.getTaskConfig()
            .getEnvironmentSettingList());
    this.javaOpts = vertexPlan.getTaskConfig().hasJavaOpts() ? vertexPlan
        .getTaskConfig().getJavaOpts() : null;

    this.containerContext = new ContainerContext(this.localResources,
        appContext.getCurrentDAG().getCredentials(), this.environment, this.javaOpts, this);

    if (vertexPlan.getInputsCount() > 0) {
      setAdditionalInputs(vertexPlan.getInputsList());
    }
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

        TaskAttemptState state) {
    }
  }

  private static ContainerContext createFakeContainerContext() {
    return new ContainerContext(new HashMap<String, LocalResource>(),
        new Credentials(), new HashMap<String, String>(), "");
  }
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

      reset(eventHandler);
      @SuppressWarnings("unchecked")
      Token<JobTokenIdentifier> jobToken = mock(Token.class);
      TokenCache.setSessionToken(jobToken, credentials);
      amContainer.handle(new AMContainerEventLaunchRequest(containerID, vertexID,
          new ContainerContext(localResources, credentials, new HashMap<String, String>(), "")));
    }
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

  private AMSchedulerEventTALaunchRequest createLaunchRequestEvent(TezTaskAttemptID taID,
      TaskAttempt ta, Resource capability, String[] hosts, String[] racks, Priority priority,
      Map<String, LocalResource> localResources) {
    return createLaunchRequestEvent(taID, ta, capability, hosts, racks, priority,
        new ContainerContext(localResources, new Credentials(), new HashMap<String, String>(), ""));
  }
View Full Code Here

Examples of org.apache.tez.dag.app.ContainerContext

      Credentials credentials = new Credentials();
      @SuppressWarnings("unchecked")
      Token<JobTokenIdentifier> jobToken = mock(Token.class);
      TokenCache.setJobToken(jobToken, credentials);
      amContainer.handle(new AMContainerEventLaunchRequest(containerID,
          vertexID, false, new ContainerContext(
              new HashMap<String, LocalResource>(), credentials,
              new HashMap<String, String>(), "")));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.