Examples of ContainerContext


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

    taskResource = Resource.newInstance(1024, 1);
    localResources = new HashMap<String, LocalResource>();
    environment = new HashMap<String, String>();
    javaOpts = "";
    leafVertex = false;
    containerContext = new ContainerContext(localResources, credentials,
        environment, javaOpts);
    Vertex vertex = mock(Vertex.class);
    eventHandler = new TestEventHandler();
    mockTask = new MockTaskImpl(vertexId, partition,
        eventHandler, conf, taskAttemptListener, clock,
View Full Code Here

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

  }
 
  @Override
  public boolean isSuperSet(Object cs1, Object cs2) {
    checkPreConditions(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) {
    checkPreConditions(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

    this.vertexContext = new VertexContext(getDAGId(),
        this.processorDescriptor.getUserPayload(), this.vertexId,
        getApplicationAttemptId());

    this.containerContext = new ContainerContext(this.localResources,
        this.credentials, 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

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

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

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

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

    localResources = new HashMap<String, LocalResource>();
    environment = new HashMap<String, String>();
    javaOpts = "";
    leafVertex = false;
    containerContext =
        new ContainerContext(localResources, credentials, environment, javaOpts);

    dispatcher = new DrainDispatcher();
    dispatcher.register(DAGEventType.class, mock(EventHandler.class));
    dispatcher.register(VertexEventType.class, mock(EventHandler.class));
    dispatcher.register(TaskEventType.class, new TaskEventHandler());
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.taskSpecificLaunchCmdOpts = taskSpecificLaunchCmdOption;
    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

  }

  private ContainerContext getContainerContext(int taskIdx) {
    if (taskSpecificLaunchCmdOpts.addTaskSpecificLaunchCmdOption(vertexName, taskIdx)) {
      String jvmOpts = taskSpecificLaunchCmdOpts.getTaskSpecificOption(javaOpts, vertexName, taskIdx);
      ContainerContext context = new ContainerContext(this.localResources,
          appContext.getCurrentDAG().getCredentials(), this.environment, jvmOpts);
      return context;
    } else {
      return this.containerContext;
    }
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.