use of org.apache.samza.job.model.ContainerModel in project samza by apache.
the class TestApplicationMasterRestClient method createSamzaApplicationState.
private SamzaApplicationState createSamzaApplicationState() {
HashMap<String, ContainerModel> containers = generateContainers();
JobModel mockJobModel = mock(JobModel.class);
when(mockJobModel.getContainers()).thenReturn(containers);
JobModelManager mockJobModelManager = mock(JobModelManager.class);
when(mockJobModelManager.jobModel()).thenReturn(mockJobModel);
SamzaApplicationState samzaApplicationState = new SamzaApplicationState(mockJobModelManager);
samzaApplicationState.runningProcessors.put(YARN_CONTAINER_ID_3, new SamzaResource(1, 2, "dummyNodeHost1", "dummyResourceId1"));
samzaApplicationState.runningProcessors.put(YARN_CONTAINER_ID_2, new SamzaResource(2, 4, "dummyNodeHost2", "dummyResourceId2"));
return samzaApplicationState;
}
Aggregations