Apache Ignite.NET
|
Ignite task interface defines a task that can be executed on the grid. Ignite task is responsible for splitting business logic into multiple Ignite jobs, receiving results from individual Ignite jobs executing on remote nodes, and reducing (aggregating) received jobs' results into final Ignite task result. More...
Upon request to execute a task, the system will do the following:
Once job execution results become available, OnResult method will be called for ech received job result. The policy returned by this method will determine the way task reacts to every job result.
If ComputeJobResultPolicy.Wait is returned, task will continue to wait for other job results. If this result is the last job result, then reduce phase will be started.
If ComputeJobResultPolicy.Reduce is returned, reduce phase will be started right away without waiting for other jobs completion (all remaining jobs will receive cancel request).
If ComputeJobResultPolicy.Failover is returned, job will be failed over to another node for execution. Note that if you use ComputeTaskAdapter<A,T,R>, it will automatically fail jobs to another node for 2 well-known failure cases: 1) job has failed to due to node crash (in this case IComputeJobResult<T>.Exception() will return ClusterTopologyException); 2) job execution was rejected, i.e. remote node has cancelled job before it got a chance to execute, while it still was on the waiting list. (in this case IComputeJobResult<T>.Exception() will return ComputeExecutionRejectedException).
TArg | Argument type. |
TJobRes | Type of job result. |
TRes | Type of final task result after reduce. |