Package org.apache.tez.dag.records

Examples of org.apache.tez.dag.records.TezDAGID


  @Test(timeout = 5000)
  public void testShuffleVertexManagerSlowStart() {
    Configuration conf = new Configuration();
    ShuffleVertexManager scheduler = null;
    EventHandler mockEventHandler = mock(EventHandler.class);
    TezDAGID dagId = new TezDAGID("1", 1, 1);
    HashMap<Vertex, Edge> mockInputVertices =
        new HashMap<Vertex, Edge>();
    Vertex mockSrcVertex1 = mock(Vertex.class);
    TezVertexID mockSrcVertexId1 = new TezVertexID(dagId, 1);
    EdgeProperty eProp1 = new EdgeProperty(
View Full Code Here


      String[] parts = str.split("_");
      if(parts.length == 6) {
        if(parts[0].equals(TezTaskID.TASK)) {
          ApplicationId appId = ApplicationId.newInstance(
              Long.valueOf(parts[1]), Integer.parseInt(parts[2]));
          TezDAGID dagId = new TezDAGID(appId, Integer.parseInt(parts[3]));
          TezVertexID vId = new TezVertexID(dagId, Integer.parseInt(parts[4]));
          return new TezTaskID(vId, Integer.parseInt(parts[5]));
        } else
          exceptionMsg = "Bad TaskType identifier. TaskId string : " + str
          + " is not properly formed.";
View Full Code Here

      String[] parts = str.split(Character.toString(TezID.SEPARATOR));
      if(parts.length == 7) {
        if(parts[0].equals(TezTaskAttemptID.ATTEMPT)) {
          ApplicationId appId = ApplicationId.newInstance(
              Long.valueOf(parts[1]), Integer.parseInt(parts[2]));
          TezDAGID dagId = new TezDAGID(appId, Integer.parseInt(parts[3]));
          TezVertexID vId = new TezVertexID(dagId, Integer.parseInt(parts[4]));
          TezTaskID tId = new TezTaskID(vId, Integer.parseInt(parts[5]));
          return new TezTaskAttemptID(tId, Integer.parseInt(parts[6]));
        } else
          exceptionMsg = "Bad TaskType identifier. TaskAttemptId string : "
View Full Code Here

    int appAttemptNumber = 1;
    TezUmbilical tezUmbilical = null; // ZZZ TestUmbilical from mapreduce
    String taskVertexName = "currentVertex";
    String destinationVertexName = "destinationVertex";
    TezDAGID dagID = new TezDAGID("2000", 1, 1);
    TezVertexID vertexID = new TezVertexID(dagID, 1);
    TezTaskID taskID = new TezTaskID(vertexID, 1);
    TezTaskAttemptID taskAttemptID = new TezTaskAttemptID(taskID, 1);
    TezCounters counters = new TezCounters();
    byte[] userPayload = TezUtils.createUserPayloadFromConf(conf);
View Full Code Here

  // FIXME hack alert assumimg only one dag per application
  public static TaskAttemptID fromTez(TezTaskAttemptID attemptId) {
    TezTaskID taskId = attemptId.getTaskID();
    TezVertexID vertexId = taskId.getVertexID();
    TezDAGID dagId = vertexId.getDAGId();
    return new TaskAttemptID(
        Long.toString(dagId.getApplicationId().getClusterTimestamp()),
        dagId.getApplicationId().getId(),
        (vertexId.getId() == 0 ? TaskType.MAP : TaskType.REDUCE),
        taskId.getId(), attemptId.getId());
  }
View Full Code Here

    LOG.info("Stopping HistoryEventHandler");
  }

  @Override
  public void handle(DAGHistoryEvent event) {
    TezDAGID dagId = context.getCurrentDAGID();
    String dagIdStr = "N/A";
    if(dagId != null) {
      dagIdStr = context.getCurrentDAGID().toString();
    }
    LOG.info("[HISTORY]"
View Full Code Here

    hosts.add("host2");
    hosts.add("host3");
    TaskLocationHint locationHint = new TaskLocationHint(hosts, null);

    TezTaskID taskID = new TezTaskID(
        new TezVertexID(new TezDAGID("1", 1, 1), 1), 1);
    TaskAttemptImpl taImpl = new MockTaskAttemptImpl(taskID, 1, eventHandler,
        mock(TaskAttemptListener.class), new Configuration(), new SystemClock(),
        mock(TaskHeartbeatHandler.class), mock(AppContext.class),
        locationHint, false, Resource.newInstance(1024, 1), createFakeContainerContext());
View Full Code Here

        Arrays.asList(new String[]{ "host1", "host2", "host3" }));
    TaskLocationHint locationHint = new TaskLocationHint(
        new TreeSet<String>(Arrays.asList(hosts)), null);

    TezTaskID taskID = new TezTaskID(
        new TezVertexID(new TezDAGID("1", 1, 1), 1), 1);
    TaskAttemptImpl taImpl = new MockTaskAttemptImpl(taskID, 1, eventHandler,
        mock(TaskAttemptListener.class), new Configuration(),
        new SystemClock(), mock(TaskHeartbeatHandler.class),
        mock(AppContext.class), locationHint, false, Resource.newInstance(1024,
            1), createFakeContainerContext());
View Full Code Here

  // received while STARTING
  public void testLaunchFailedWhileKilling() throws Exception {
    ApplicationId appId = ApplicationId.newInstance(1, 2);
    ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(
        appId, 0);
    TezDAGID dagID = new TezDAGID(appId, 1);
    TezVertexID vertexID = new TezVertexID(dagID, 1);
    TezTaskID taskID = new TezTaskID(vertexID, 1);
    TezTaskAttemptID taskAttemptID = new TezTaskAttemptID(taskID, 0);

    MockEventHandler eventHandler = new MockEventHandler();
View Full Code Here

  // the TaskAttempt
  public void testContainerTerminationWhileRunning() throws Exception {
    ApplicationId appId = ApplicationId.newInstance(1, 2);
    ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(
        appId, 0);
    TezDAGID dagID = new TezDAGID(appId, 1);
    TezVertexID vertexID = new TezVertexID(dagID, 1);
    TezTaskID taskID = new TezTaskID(vertexID, 1);
    TezTaskAttemptID taskAttemptID = new TezTaskAttemptID(taskID, 0);

    MockEventHandler eventHandler = spy(new MockEventHandler());
View Full Code Here

TOP

Related Classes of org.apache.tez.dag.records.TezDAGID

Copyright © 2018 www.massapicom. 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.