DelegatingInputFormat (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.mapreduce.lib.input
Class DelegatingInputFormat<K,V>

    java.lang.Object
      org.apache.hadoop.mapreduce.InputFormat<K,V>
          org.apache.hadoop.mapreduce.lib.input.DelegatingInputFormat<K,V>

    @InterfaceAudience.Private
    @InterfaceStability.Unstable
    public class DelegatingInputFormat<K,V>

extends InputFormat<K,V>

An `InputFormat` that delegates behavior of paths to multiple other InputFormats.

See Also:
  `MultipleInputs.addInputPath(Job, Path, Class, Class)`

Constructor Summary
`DelegatingInputFormat()`

Method Summary
`RecordReader<K,V>` | `createRecordReader(InputSplit split, TaskAttemptContext context)` Create a record reader for a given split.
`List<InputSplit>` | `getSplits(JobContext job)` Logically split the set of input files for the job.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DelegatingInputFormat

    public DelegatingInputFormat()

Method Detail

### getSplits

    public List<InputSplit> getSplits(JobContext job)
                               throws IOException,
                                      InterruptedException

  Description copied from class: `InputFormat`
  Logically split the set of input files for the job.

  Each `InputSplit` is then assigned to an individual `Mapper` for processing.

  Note: The split is a logical split of the inputs and the input files are not physically split into chunks. For e.g. a split could be <input-file-path, start, offset> tuple. The InputFormat also creates the `RecordReader` to read the `InputSplit`.

  Specified by:
    `getSplits` in class `InputFormat<K,V>`
  Parameters:
    `job` - job configuration.
  Returns:
    an array of `InputSplit`s for the job.
  Throws:
    `IOException`
    `InterruptedException`

### createRecordReader

    public RecordReader<K,V> createRecordReader(InputSplit split,
                                                TaskAttemptContext context)
                                         throws IOException,
                                                InterruptedException

  Description copied from class: `InputFormat`
  Create a record reader for a given split. The framework will call `RecordReader.initialize(InputSplit, TaskAttemptContext)` before the split is used.

  Specified by:
    `createRecordReader` in class `InputFormat<K,V>`
  Parameters:
    `split` - the split to be read
    `context` - the information about the task
  Returns:
    a new record reader
  Throws:
    `IOException`
    `InterruptedException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation