org.apache.ignite.internal.processors.cache.query.jdbc

## Class GridCacheQueryJdbcMetadataTask

- java.lang.Object
- - org.apache.ignite.compute.ComputeTaskAdapter<String,byte[]>
  - - org.apache.ignite.internal.processors.cache.query.jdbc.GridCacheQueryJdbcMetadataTask

All Implemented Interfaces:
  Serializable, ComputeTask<String,byte[]>

    public class GridCacheQueryJdbcMetadataTask
    extends ComputeTaskAdapter<String,byte[]>

Task that gets metadata for JDBC adapter.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridCacheQueryJdbcMetadataTask()`

### Method Summary

All Methods Instance Methods Concrete Methods
`@NotNull Map<? extends ComputeJob,ClusterNode>` `map(List<ClusterNode> subgrid, @Nullable String cacheName)` This method is called to map or split grid task into multiple grid jobs.
`byte[]` `reduce(List<ComputeJobResult> results)` Reduces (or aggregates) results received so far into one compound result to be returned to caller via `ComputeTaskFuture.get()` method.

### Methods inherited from class org.apache.ignite.compute.ComputeTaskAdapter

`result`

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

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

### Constructor Detail

#### GridCacheQueryJdbcMetadataTask

    public GridCacheQueryJdbcMetadataTask()

### Method Detail

#### map

    @NotNull
    public @NotNull Map<? extends ComputeJob,ClusterNode> map(List<ClusterNode> subgrid,
                                                                       @Nullable
                                                                       @Nullable String cacheName)

This method is called to map or split grid task into multiple grid jobs. This is the first method that gets called when task execution starts.

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 grid nodes, the order of nodes will be random which over time should result into all nodes being used equally.
  `cacheName` - Task execution argument. Can be `null`. This is the same argument as the one passed into `Grid#execute(...)` methods.
Returns:
  Map of grid jobs assigned to subgrid node. Unless `ComputeTaskContinuousMapper` is injected into task, if `null` or empty map is returned, exception will be thrown.

#### reduce

    public byte[] reduce(List<ComputeJobResult> results)

Reduces (or aggregates) results received so far into one compound result to be returned to caller via `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.

Parameters:
  `results` - Received results of broadcasted remote executions. Note that if task class has `ComputeTaskNoResultCache` annotation, then this list will be empty.
Returns:
  Grid job result constructed from results of remote executions.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020