This class defines simplified adapter for IComputeTask<A,T,R>. This adapter can be used when jobs can be randomly assigned to available Ignite nodes. This adapter is sufficient in most homogeneous environments where all nodes are equally suitable for executing grid job, see Split method for more details.
More...
|
abstract ICollection< IComputeJob< TJobRes > > | Split (int gridSize, TArg arg) |
| This is a simplified version of IComputeTask<A,T,R>.Map method. This method basically takes given argument and splits it into a collection of IComputeJob using provided grid size as indication of how many node are available. These jobs will be randomly mapped to available Ignite nodes. Note that if number of jobs is greater than number of Ignite nodes (i.e, grid size), the grid nodes will be reused and some jobs will end up on the same Ignite nodes. More...
|
|
- Parameters
-
subgrid | Nodes available for this task execution. Note that order of nodes is guaranteed to be randomized by container. This ensures that every time you simply iterate through Ignite nodes, the order of nodes will be random which over time should result into all nodes being used equally. |
arg | Task execution argument. Can be null . This is the same argument as the one passed into ICompute.Execute() methods. |
- Returns
- Map of Ignite jobs assigned to subgrid node. If
null
or empty map is returned, exception will be thrown.
- Exceptions
-
IgniteException | Split returned no jobs. |
Implements Apache.Ignite.Core.Compute.ComputeTaskAdapter< TArg, TJobRes, TTaskRes >.
- Parameters
-
gridSize | Number of available Ignite nodes. Note that returned number of jobs can be less, equal or greater than this grid size. |
arg | Task execution argument. Can be null . |