org.apache.ignite.internal.visor.node

## Class VisorNodeDataCollectorTask

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorMultiNodeTask<VisorNodeDataCollectorTaskArg,VisorNodeDataCollectorTaskResult,VisorNodeDataCollectorJobResult>
  - - org.apache.ignite.internal.visor.node.VisorNodeDataCollectorTask

All Implemented Interfaces:
  Serializable, ComputeTask<VisorTaskArgument<VisorNodeDataCollectorTaskArg>,VisorNodeDataCollectorTaskResult>

    @GridInternal
    public class VisorNodeDataCollectorTask
    extends VisorMultiNodeTask<VisorNodeDataCollectorTaskArg,VisorNodeDataCollectorTaskResult,VisorNodeDataCollectorJobResult>

Collects current Grid state mostly topology and metrics.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.visor.VisorMultiNodeTask

`debug, ignite, start, taskArg`

### Constructor Summary

Constructors
Constructor and Description
`VisorNodeDataCollectorTask()`

### Method Summary

Methods
`protected VisorNodeDataCollectorJob` `job(VisorNodeDataCollectorTaskArg arg)`
`protected Map<? extends ComputeJob,ClusterNode>` `map0(List<ClusterNode> subgrid, VisorTaskArgument<VisorNodeDataCollectorTaskArg> arg)` Actual map logic.
`protected VisorNodeDataCollectorTaskResult` `reduce(VisorNodeDataCollectorTaskResult taskRes, List<ComputeJobResult> results)`
`protected VisorNodeDataCollectorTaskResult` `reduce0(List<ComputeJobResult> results)` Actual reduce logic.
`protected void` `reduceJobResult(VisorNodeDataCollectorTaskResult taskRes, VisorNodeDataCollectorJobResult jobRes, UUID nid)` Reduce job result.

### Methods inherited from class org.apache.ignite.internal.visor.VisorMultiNodeTask

`map, reduce, result`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### VisorNodeDataCollectorTask

    public VisorNodeDataCollectorTask()

### Method Detail

#### map0

    protected Map<? extends ComputeJob,ClusterNode> map0(List<ClusterNode> subgrid,
                                             VisorTaskArgument<VisorNodeDataCollectorTaskArg> arg)

Actual map logic.

Overrides:
  `map0` in class `VisorMultiNodeTask<VisorNodeDataCollectorTaskArg,VisorNodeDataCollectorTaskResult,VisorNodeDataCollectorJobResult>`
Parameters:
  `subgrid` - Nodes available for this task execution.
  `arg` - Task execution argument.
Returns:
  Map of grid jobs assigned to subgrid node.

#### job

    protected VisorNodeDataCollectorJob job(VisorNodeDataCollectorTaskArg arg)

Specified by:
  `job` in class `VisorMultiNodeTask<VisorNodeDataCollectorTaskArg,VisorNodeDataCollectorTaskResult,VisorNodeDataCollectorJobResult>`
Parameters:
  `arg` - Task arg.
Returns:
  New job.

#### reduce0

    @Nullable
    protected VisorNodeDataCollectorTaskResult reduce0(List<ComputeJobResult> results)

Actual reduce logic.

Specified by:
  `reduce0` in class `VisorMultiNodeTask<VisorNodeDataCollectorTaskArg,VisorNodeDataCollectorTaskResult,VisorNodeDataCollectorJobResult>`
Parameters:
  `results` - Job results.
Returns:
  Task result.

#### reduce

    protected VisorNodeDataCollectorTaskResult reduce(VisorNodeDataCollectorTaskResult taskRes,
                                          List<ComputeJobResult> results)

Parameters:
  `taskRes` - Task result.
  `results` - Results.
Returns:
  Data collector task result.

#### reduceJobResult

    protected void reduceJobResult(VisorNodeDataCollectorTaskResult taskRes,
                       VisorNodeDataCollectorJobResult jobRes,
                       UUID nid)

Reduce job result.

Parameters:
  `taskRes` - Task result.
  `jobRes` - Job result.
  `nid` - Node ID.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.2.0-incubating
Release Date | : June 16 2015