Search in sources :

Example 1 with TaskCommunicatorWrapper

use of org.apache.tez.dag.app.TaskCommunicatorWrapper in project tez by apache.

the class TestTaskAttempt method createMockTaskAttemptListener.

private TaskCommunicatorManagerInterface createMockTaskAttemptListener() throws ServicePluginException {
    TaskCommunicatorManagerInterface taListener = mock(TaskCommunicatorManagerInterface.class);
    TaskCommunicator taskComm = mock(TaskCommunicator.class);
    doReturn(new InetSocketAddress("localhost", 0)).when(taskComm).getAddress();
    doReturn(new TaskCommunicatorWrapper(taskComm)).when(taListener).getTaskCommunicator(0);
    return taListener;
}
Also used : TaskCommunicator(org.apache.tez.serviceplugins.api.TaskCommunicator) TaskCommunicatorWrapper(org.apache.tez.dag.app.TaskCommunicatorWrapper) InetSocketAddress(java.net.InetSocketAddress) TaskCommunicatorManagerInterface(org.apache.tez.dag.app.TaskCommunicatorManagerInterface)

Aggregations

InetSocketAddress (java.net.InetSocketAddress)1 TaskCommunicatorManagerInterface (org.apache.tez.dag.app.TaskCommunicatorManagerInterface)1 TaskCommunicatorWrapper (org.apache.tez.dag.app.TaskCommunicatorWrapper)1 TaskCommunicator (org.apache.tez.serviceplugins.api.TaskCommunicator)1