public class MutateTask extends ComputeTaskAdapter<List<Long>,Boolean>
| Constructor and Description |
|---|
MutateTask(GAConfiguration cfg) |
| Modifier and Type | Method and Description |
|---|---|
Map |
map(List<ClusterNode> nodes,
List<Long> chromosomeKeys)
This method is called to map or split grid task into multiple grid jobs.
|
Boolean |
reduce(List<ComputeJobResult> list)
We return TRUE if success, else Exection is thrown.
|
ComputeJobResultPolicy |
result(ComputeJobResult res,
List<ComputeJobResult> rcvd)
Default implementation which will wait for all jobs to complete before
calling
ComputeTask.reduce(List) method. |
public MutateTask(GAConfiguration cfg)
cfg - GAConfigurationpublic Map map(List<ClusterNode> nodes, List<Long> chromosomeKeys) throws IgniteException
ComputeTasknodes - List of ClusterNodechromosomeKeys - Primary keys for respective chromosomesComputeTaskContinuousMapper is
injected into task, if null or empty map is returned, exception will be thrown.IgniteException - If mapping could not complete successfully. This exception will be
thrown out of ComputeTaskFuture.get() method.public Boolean reduce(List<ComputeJobResult> list) throws IgniteException
list - List of ComputeJobResultIgniteException - If reduction or results caused an error. This exception will
be thrown out of ComputeTaskFuture.get() method.public ComputeJobResultPolicy result(ComputeJobResult res, List<ComputeJobResult> rcvd)
ComputeTaskAdapterComputeTask.reduce(List) method.
If remote job resulted in exception (ComputeJobResult.getException() is not null),
then ComputeJobResultPolicy.FAILOVER policy will be returned if the exception is instance
of ClusterTopologyException or 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.
result in interface ComputeTask<List<Long>,Boolean>result in class ComputeTaskAdapter<List<Long>,Boolean>res - ComputeJobResultrcvd - List of ComputeJobResult
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019