Search in sources :

Example 1 with VertexIdentifier

use of org.apache.tez.runtime.api.VertexIdentifier in project tez by apache.

the class TestRootInputVertexManager method createTaskAttemptIdentifier.

public static TaskAttemptIdentifier createTaskAttemptIdentifier(String vName, int tId) {
    VertexIdentifier mockVertex = mock(VertexIdentifier.class);
    when(mockVertex.getName()).thenReturn(vName);
    TaskIdentifier mockTask = mock(TaskIdentifier.class);
    when(mockTask.getIdentifier()).thenReturn(tId);
    when(mockTask.getVertexIdentifier()).thenReturn(mockVertex);
    TaskAttemptIdentifier mockAttempt = mock(TaskAttemptIdentifier.class);
    when(mockAttempt.getIdentifier()).thenReturn(0);
    when(mockAttempt.getTaskIdentifier()).thenReturn(mockTask);
    return mockAttempt;
}
Also used : TaskIdentifier(org.apache.tez.runtime.api.TaskIdentifier) VertexIdentifier(org.apache.tez.runtime.api.VertexIdentifier) TaskAttemptIdentifier(org.apache.tez.runtime.api.TaskAttemptIdentifier)

Example 2 with VertexIdentifier

use of org.apache.tez.runtime.api.VertexIdentifier in project tez by apache.

the class TestShuffleVertexManagerUtils method createTaskAttemptIdentifier.

public static TaskAttemptIdentifier createTaskAttemptIdentifier(String vName, int tId) {
    VertexIdentifier mockVertex = mock(VertexIdentifier.class);
    when(mockVertex.getName()).thenReturn(vName);
    TaskIdentifier mockTask = mock(TaskIdentifier.class);
    when(mockTask.getIdentifier()).thenReturn(tId);
    when(mockTask.getVertexIdentifier()).thenReturn(mockVertex);
    TaskAttemptIdentifier mockAttempt = mock(TaskAttemptIdentifier.class);
    when(mockAttempt.getIdentifier()).thenReturn(0);
    when(mockAttempt.getTaskIdentifier()).thenReturn(mockTask);
    return mockAttempt;
}
Also used : TaskIdentifier(org.apache.tez.runtime.api.TaskIdentifier) VertexIdentifier(org.apache.tez.runtime.api.VertexIdentifier) TaskAttemptIdentifier(org.apache.tez.runtime.api.TaskAttemptIdentifier)

Aggregations

TaskAttemptIdentifier (org.apache.tez.runtime.api.TaskAttemptIdentifier)2 TaskIdentifier (org.apache.tez.runtime.api.TaskIdentifier)2 VertexIdentifier (org.apache.tez.runtime.api.VertexIdentifier)2