use of com.alibaba.datax.core.statistics.container.report.ProcessInnerReporter in project DataX by alibaba.
the class ProcessInnerReporterTest method testReportJobCommunication.
@Test
public void testReportJobCommunication() {
Long jobId = 0L;
Communication communication = new Communication();
ProcessInnerReporter processInnerReporter = new ProcessInnerReporter();
processInnerReporter.reportJobCommunication(jobId, communication);
System.out.println("this function do noting");
}
use of com.alibaba.datax.core.statistics.container.report.ProcessInnerReporter in project DataX by alibaba.
the class ProcessInnerReporterTest method testReportTGCommunication.
@Test
public void testReportTGCommunication() throws NoSuchFieldException, IllegalAccessException {
Integer taskGroupId = 1;
Communication communication = new Communication();
communication.setState(State.SUBMITTING);
ConcurrentHashMap<Integer, Communication> map = new ConcurrentHashMap<Integer, Communication>();
map.put(taskGroupId, communication);
ReflectUtil.setField(new LocalTGCommunicationManager(), "taskGroupCommunicationMap", map);
ProcessInnerReporter processInnerReporter = new ProcessInnerReporter();
Communication updateCommunication = new Communication();
updateCommunication.setState(State.WAITING);
processInnerReporter.reportTGCommunication(taskGroupId, updateCommunication);
Assert.assertEquals(map.get(taskGroupId).getState(), State.WAITING);
}
Aggregations