@GridInternal public class VerifyBackupPartitionsTaskV2 extends ComputeTaskAdapter<VisorIdleVerifyTaskArg,IdleVerifyResultV2>
IdleVerifyResultV2 with conflict partitions.
| Modifier and Type | Field and Description |
|---|---|
static IgniteProductVersion |
V2_SINCE_VER
First version of Ignite that is capable of executing Idle Verify V2.
|
| Constructor and Description |
|---|
VerifyBackupPartitionsTaskV2() |
| Modifier and Type | Method and Description |
|---|---|
@NotNull Map<? extends ComputeJob,ClusterNode> |
map(List<ClusterNode> subgrid,
VisorIdleVerifyTaskArg arg)
This method is called to map or split grid task into multiple grid jobs.
|
@Nullable IdleVerifyResultV2 |
reduce(List<ComputeJobResult> results)
Reduces (or aggregates) results received so far into one compound result to be returned to
caller via
ComputeTaskFuture.get() method. |
ComputeJobResultPolicy |
result(ComputeJobResult res,
List<ComputeJobResult> rcvd)
Default implementation which will wait for all jobs to complete before
calling
ComputeTask.reduce(List) method. |
public static final IgniteProductVersion V2_SINCE_VER
@NotNull public @NotNull Map<? extends ComputeJob,ClusterNode> map(List<ClusterNode> subgrid, VisorIdleVerifyTaskArg arg) throws IgniteException
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.IgniteException - If mapping could not complete successfully. This exception will be
thrown out of ComputeTaskFuture.get() method.@Nullable public @Nullable IdleVerifyResultV2 reduce(List<ComputeJobResult> results) throws IgniteException
ComputeTaskFuture.get() method.
Note, that if some jobs did not succeed and could not be failed over then the list of results passed into this method will include the failed results. Otherwise, failed results will not be in the list.
results - Received results of broadcasted remote executions. Note that if task class has
ComputeTaskNoResultCache annotation, then this list will be empty.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) throws IgniteException
ComputeTask.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<VisorIdleVerifyTaskArg,IdleVerifyResultV2>result in class ComputeTaskAdapter<VisorIdleVerifyTaskArg,IdleVerifyResultV2>res - Received remote grid executable result.rcvd - All previously received results.IgniteException - If handling a job result caused an error effectively rejecting
a failover. This exception will be thrown out of ComputeTaskFuture.get() method.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020