org.apache.ignite.igfs.mapreduce

## Class IgfsInputStreamJobAdapter

- java.lang.Object
- - org.apache.ignite.igfs.mapreduce.IgfsJobAdapter
  - - org.apache.ignite.igfs.mapreduce.IgfsInputStreamJobAdapter

All Implemented Interfaces:
  IgfsJob

    public abstract class IgfsInputStreamJobAdapter
    extends IgfsJobAdapter

Convenient `IgfsJob` adapter. It limits data returned from `IgfsInputStream` to bytes within the `IgfsFileRange` assigned to the job.

Under the covers it simply puts job's `IgfsInputStream` position to range start and wraps in into `GridFixedSizeInputStream` limited to range length.

### Constructor Summary

Constructors
Constructor and Description
`IgfsInputStreamJobAdapter()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`Object` `execute(IgniteFileSystem igfs, IgfsFileRange range, IgfsInputStream in)` Executes this job.
`abstract Object` `execute(IgniteFileSystem igfs, IgfsRangeInputStream in)` Executes this job.

### Methods inherited from class org.apache.ignite.igfs.mapreduce.IgfsJobAdapter

`cancel`

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

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

### Constructor Detail

#### IgfsInputStreamJobAdapter

    public IgfsInputStreamJobAdapter()

### Method Detail

#### execute

    public final Object execute(IgniteFileSystem igfs,
                                IgfsFileRange range,
                                IgfsInputStream in)
                         throws IgniteException,
                                IOException

Executes this job.

Parameters:
  `igfs` - IGFS instance.
  `range` - File range aligned to record boundaries.
  `in` - Input stream for split file. This input stream is not aligned to range and points to file start by default.
Returns:
  Execution result.
Throws:
  `IgniteException` - If execution failed.
  `IOException` - If file system operation resulted in IO exception.

#### execute

    public abstract Object execute(IgniteFileSystem igfs,
                                   IgfsRangeInputStream in)
                            throws IgniteException,
                                   IOException

Executes this job.

Parameters:
  `igfs` - IGFS instance.
  `in` - Input stream.
Returns:
  Execution result.
Throws:
  `IgniteException` - If execution failed.
  `IOException` - If IO exception encountered while working with stream.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.5
Release Date | : June 4 2019