use of com.hazelcast.mapreduce.impl.task.MemberAssigningJobProcessInformationImpl in project hazelcast by hazelcast.
the class RequestMemberIdAssignment method run.
@Override
public void run() throws Exception {
MapReduceService mapReduceService = getService();
JobSupervisor supervisor = mapReduceService.getJobSupervisor(getName(), getJobId());
if (supervisor == null) {
result = new RequestPartitionResult(NO_SUPERVISOR, -1);
return;
}
MemberAssigningJobProcessInformationImpl processInformation = getProcessInformation(supervisor);
int memberId = processInformation.assignMemberId(getCallerAddress(), getCallerUuid(), supervisor.getConfiguration());
if (memberId == -1) {
result = new RequestPartitionResult(NO_MORE_PARTITIONS, -1);
return;
}
result = new RequestPartitionResult(SUCCESSFUL, memberId);
}
Aggregations