@ComputeTaskNoResultCache public class PlatformBalancingSingleClosureAffinityTask extends PlatformAbstractTask
ctx, done, lock, taskPtr
Constructor and Description |
---|
PlatformBalancingSingleClosureAffinityTask(PlatformContext ctx,
long taskPtr)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
affinity(String cacheName,
Object affKey,
GridKernalContext ctx)
Init affinity.
|
void |
job(PlatformJob job) |
Map<? extends ComputeJob,ClusterNode> |
map(List<ClusterNode> subgrid,
Object arg)
This method is called to map or split grid task into multiple grid jobs.
|
onDone, reduce, result
public PlatformBalancingSingleClosureAffinityTask(PlatformContext ctx, long taskPtr)
ctx
- Platform context.taskPtr
- Task pointer.@Nullable public Map<? extends ComputeJob,ClusterNode> map(List<ClusterNode> subgrid, @Nullable Object arg)
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 grid 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 Grid#execute(...)
methods.ComputeTaskContinuousMapper
is
injected into task, if null
or empty map is returned, exception will be thrown.public void job(PlatformJob job)
job
- Job.public void affinity(String cacheName, Object affKey, GridKernalContext ctx)
cacheName
- Cache name.affKey
- Affinity key.ctx
- Kernal context.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017