public class MutateTask extends ComputeTaskAdapter<List<Long>,Boolean>
|Modifier and Type||Method and Description|
This method is called to map or split grid task into multiple grid jobs.
We return TRUE if success, else Exection is thrown.
Default implementation which will wait for all jobs to complete before calling
public MutateTask(GAConfiguration cfg)
public Map map(List<ClusterNode> nodes, List<Long> chromosomeKeys) throws IgniteException
nodes- List of ClusterNode
chromosomeKeys- Primary keys for respective chromosomes
ComputeTaskContinuousMapperis injected into task, if
nullor empty map is returned, exception will be thrown.
IgniteException- If mapping could not complete successfully. This exception will be thrown out of
public Boolean reduce(List<ComputeJobResult> list) throws IgniteException
public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd)
If remote job resulted in exception (
ComputeJobResult.getException() is not
ComputeJobResultPolicy.FAILOVER policy will be returned if the exception is instance
ComputeExecutionRejectedException, which means that
remote node either failed or job execution was rejected before it got a chance to start. In all
other cases the exception will be rethrown which will ultimately cause task to fail.