org.apache.ignite.internal.processors.hadoop

## Interface HadoopJob

    public interface HadoopJob

Hadoop job.

### Method Summary

Methods
`void` `cleanupStagingDirectory()` Cleans up the job staging directory.
`void` `cleanupTaskEnvironment(HadoopTaskInfo info)` Cleans up local environment of the task.
`void` `dispose(boolean external)` Release all the resources.
`HadoopTaskContext` `getTaskContext(HadoopTaskInfo info)` Returns context for task execution.
`HadoopJobId` `id()` Gets job ID.
`String` `igniteWorkDirectory()`
`HadoopJobInfo` `info()` Gets job information.
`void` `initialize(boolean external, UUID locNodeId)` Does all the needed initialization for the job.
`Collection<HadoopInputSplit>` `input()` Gets collection of input splits for this job.
`void` `prepareTaskEnvironment(HadoopTaskInfo info)` Prepare local environment for the task.

### Method Detail

#### id

    HadoopJobId id()

Gets job ID.

Returns:
  Job ID.

#### info

    HadoopJobInfo info()

Gets job information.

Returns:
  Job information.

#### input

    Collection<HadoopInputSplit> input()
                                       throws IgniteCheckedException

Gets collection of input splits for this job.

Returns:
  Input splits.
Throws:
  `IgniteCheckedException`

#### getTaskContext

    HadoopTaskContext getTaskContext(HadoopTaskInfo info)
                                     throws IgniteCheckedException

Returns context for task execution.

Parameters:
  `info` - Task info.
Returns:
  Task Context.
Throws:
  `IgniteCheckedException` - If failed.

#### initialize

    void initialize(boolean external,
                  UUID locNodeId)
                    throws IgniteCheckedException

Does all the needed initialization for the job. Will be called on each node where tasks for this job must be executed.

If job is running in external mode this method will be called on instance in Ignite node with parameter `false` and on instance in external process with parameter `true`.

Parameters:
  `external` - If `true` then this job instance resides in external process.
  `locNodeId` - Local node ID.
Throws:
  `IgniteCheckedException` - If failed.

#### dispose

    void dispose(boolean external)
                 throws IgniteCheckedException

Release all the resources.

If job is running in external mode this method will be called on instance in Ignite node with parameter `false` and on instance in external process with parameter `true`.

Parameters:
  `external` - If `true` then this job instance resides in external process.
Throws:
  `IgniteCheckedException` - If failed.

#### prepareTaskEnvironment

    void prepareTaskEnvironment(HadoopTaskInfo info)
                                throws IgniteCheckedException

Prepare local environment for the task.

Parameters:
  `info` - Task info.
Throws:
  `IgniteCheckedException` - If failed.

#### cleanupTaskEnvironment

    void cleanupTaskEnvironment(HadoopTaskInfo info)
                                throws IgniteCheckedException

Cleans up local environment of the task.

Parameters:
  `info` - Task info.
Throws:
  `IgniteCheckedException` - If failed.

#### cleanupStagingDirectory

    void cleanupStagingDirectory()

Cleans up the job staging directory.

#### igniteWorkDirectory

    String igniteWorkDirectory()

Returns:
  Ignite work directory.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.8.0
Release Date | : December 5 2016