Search in sources :

Example 1 with JobProcessInformation

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);
}
Also used : JobProcessInformation(com.hazelcast.mapreduce.JobProcessInformation) JobPartitionState(com.hazelcast.mapreduce.JobPartitionState) MapReduceService(com.hazelcast.mapreduce.impl.MapReduceService) JobSupervisor(com.hazelcast.mapreduce.impl.task.JobSupervisor)

Aggregations

JobPartitionState (com.hazelcast.mapreduce.JobPartitionState)1 JobProcessInformation (com.hazelcast.mapreduce.JobProcessInformation)1 MapReduceService (com.hazelcast.mapreduce.impl.MapReduceService)1 JobSupervisor (com.hazelcast.mapreduce.impl.task.JobSupervisor)1