use of com.hazelcast.mapreduce.JobProcessInformation in project hazelcast by hazelcast.
the class MapReduceJobProcessInformationMessageTask method call.
@Override
protected Object call() throws Exception {
MapReduceService mapReduceService = getService(MapReduceService.SERVICE_NAME);
JobSupervisor supervisor = mapReduceService.getJobSupervisor(parameters.name, parameters.jobId);
if (supervisor != null && supervisor.getJobProcessInformation() != null) {
JobProcessInformation current = supervisor.getJobProcessInformation();
List<JobPartitionState> jobPartitionStates = Arrays.asList(current.getPartitionStates());
return MapReduceJobProcessInformationCodec.encodeResponse(jobPartitionStates, current.getProcessedRecords());
}
throw new IllegalStateException("Information not found for map reduce with name : " + parameters.name + ", job id : " + parameters.jobId);
}
Aggregations