public class TruncateSelectionTask extends ComputeTaskAdapter<List<Long>,Boolean>
| Constructor and Description |
|---|
TruncateSelectionTask(List<Long> fittestKeys,
int numOfCopies) |
| 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 Exception 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 Map map(List<ClusterNode> nodes, List<Long> chromosomeKeys) throws IgniteException
ComputeTasknodes - List of ClusterNode.chromosomeKeys - Primary keys for respective chromosomes.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 ComputeJobResult.IgniteException - 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 - ComputeJobResult.rcvd - List of ComputeJobResult.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019