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;
}
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;
}
Aggregations