Package org.apache.tez.dag.records

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


              " srcIndex = " + srcTaskIndex +
              " destAttemptId=" + destAttemptId +
              " destIndex=" + destTaskIndex +
              " edgeManager=" + edgeManager.getClass().getName());
        }
        TezTaskID srcTaskId = srcTask.getTaskId();
        int taskAttemptIndex = event.getVersion();
        TezTaskAttemptID srcTaskAttemptId = TezTaskAttemptID.getInstance(srcTaskId,
            taskAttemptIndex);
        eventHandler.handle(new TaskAttemptEventOutputFailed(srcTaskAttemptId,
            tezEvent, numConsumers));
View Full Code Here


              " srcIndex = " + srcTaskIndex +
              " destAttemptId=" + destinationVertex.getVertexId() +
              " destIndex=" + destTaskIndex +
              " edgeManager=" + edgeManager.getClass().getName());
        }
        TezTaskID destTaskId = destTask.getTaskId();
        sendEventToTask(destTaskId, tezEventToSend);
      }
    }
  }
View Full Code Here

      when(appContext.getApplicationAttemptId()).thenReturn(appAttemptID);
      when(appContext.getApplicationID()).thenReturn(applicationID);

      dagID = new TezDAGID(applicationID, 1);
      vertexID = new TezVertexID(dagID, 1);
      taskID = new TezTaskID(vertexID, 1);
      taskAttemptID = new TezTaskAttemptID(taskID, 1);

      taskSpec = mock(TaskSpec.class);
      doReturn(taskAttemptID).when(taskSpec).getTaskAttemptID();
View Full Code Here

public class TezTestUtils {

  public static TezTaskAttemptID getMockTaskAttemptId(
      int jobId, int vertexId, int taskId, int taskAttemptId) {
    return new TezTaskAttemptID(
        new TezTaskID(
            new TezVertexID(
                new TezDAGID(
                    ApplicationId.newInstance(0, jobId), jobId),
                    vertexId),
                    taskId)
View Full Code Here

        , taskAttemptId);
  }
 
  public static TezTaskID getMockTaskId(int jobId,
      int vertexId, int taskId) {
    return new TezTaskID(
        new TezVertexID(new TezDAGID(
            ApplicationId.newInstance(0, jobId),
            jobId), vertexId),
            taskId);
  }
View Full Code Here

  }

  // FIXME hack alert converting objects with hard coded id
  public static TezTaskID
      fromMRTaskId(org.apache.hadoop.mapreduce.TaskID taskid) {
    return new TezTaskID(
        new TezVertexID(fromMRJobId(taskid.getJobID()),
                (taskid.getTaskType() == TaskType.MAP ? 0 : 1)
            ),
        taskid.getId());
  }
View Full Code Here

    initAllVertices(VertexState.INITED);
    VertexImpl v3 = vertices.get("vertex3");
    Assert.assertEquals(2, v3.getTotalTasks());
    Map<TezTaskID, Task> tasks = v3.getTasks();
    Assert.assertEquals(2, tasks.size());
    TezTaskID firstTask = tasks.keySet().iterator().next();

    startVertex(v3);

    Vertex v1 = vertices.get("vertex1");
    EdgeManager mockEdgeManager = mock(EdgeManager.class);
View Full Code Here

    initAllVertices(VertexState.INITED);

    VertexImpl v = vertices.get("vertex2");
    startVertex(v);

    TezTaskID t1 = new TezTaskID(v.getVertexId(), 0);
    TezTaskID t2 = new TezTaskID(v.getVertexId(), 1);

    dispatcher.getEventHandler().handle(
        new VertexEventTaskCompleted(t1, TaskState.SUCCEEDED));
    dispatcher.await();
    Assert.assertEquals(VertexState.RUNNING, v.getState());
View Full Code Here

    initAllVertices(VertexState.INITED);

    VertexImpl v = vertices.get("vertex2");
    startVertex(v);

    TezTaskID t1 = new TezTaskID(v.getVertexId(), 0);
    TezTaskID t2 = new TezTaskID(v.getVertexId(), 1);

    dispatcher.getEventHandler().handle(
        new VertexEventTaskCompleted(t1, TaskState.SUCCEEDED));
    dispatcher.await();
    Assert.assertEquals(VertexState.RUNNING, v.getState());
View Full Code Here

              " srcIndex = " + srcTaskIndex +
              " destAttemptId=" + destAttemptId +
              " destIndex=" + destTaskIndex +
              " edgeManager=" + edgeManager.getClass().getName());
        }
        TezTaskID srcTaskId = srcTask.getTaskId();
        int taskAttemptIndex = event.getVersion();
        TezTaskAttemptID srcTaskAttemptId = new TezTaskAttemptID(srcTaskId,
            taskAttemptIndex);
        eventHandler.handle(new TaskAttemptEventOutputFailed(srcTaskAttemptId,
            tezEvent, numConsumers));
View Full Code Here

TOP

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

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.