org.apache.hadoop.mapred

## Class MultiFileSplit

- java.lang.Object
- - org.apache.hadoop.mapreduce.InputSplit
  - - org.apache.hadoop.mapreduce.lib.input.CombineFileSplit
    - - org.apache.hadoop.mapred.lib.CombineFileSplit
      - - org.apache.hadoop.mapred.MultiFileSplit

- All Implemented Interfaces:
    org.apache.hadoop.io.Writable, InputSplit

      @InterfaceAudience.Public
       @InterfaceStability.Stable
      public class MultiFileSplit
      extends CombineFileSplit

  A sub-collection of input files. Unlike `FileSplit`, MultiFileSplit class does not represent a split of a file, but a split of input files into smaller sets. The atomic unit of split is a file.
  MultiFileSplit can be used to implement `RecordReader`'s, with reading one record per file.
  See Also:
    `FileSplit`, `MultiFileInputFormat`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiFileSplit(JobConf job, org.apache.hadoop.fs.Path[] files, long[] lengths)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `getLocations()` Returns all the Paths where this input-split resides
    `String` | `toString()`

    - ### Methods inherited from class org.apache.hadoop.mapred.lib.CombineFileSplit

      `getJob`

    - ### Methods inherited from class org.apache.hadoop.mapreduce.lib.input.CombineFileSplit

      `getLength, getLength, getLengths, getNumPaths, getOffset, getPath, getPaths, getStartOffsets, readFields, write`

    - ### Methods inherited from class org.apache.hadoop.mapreduce.InputSplit

      `getLocationInfo`

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

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

    - ### Methods inherited from interface org.apache.hadoop.mapred.InputSplit

      `getLength`

    - ### Methods inherited from interface org.apache.hadoop.io.Writable

      `readFields, write`

- - ### Constructor Detail

    - #### MultiFileSplit

          public MultiFileSplit(JobConf job,
                                org.apache.hadoop.fs.Path[] files,
                                long[] lengths)

  - ### Method Detail

    - #### getLocations

          public String[] getLocations()
                                throws IOException

      Description copied from class: `CombineFileSplit`
      Returns all the Paths where this input-split resides
      Specified by:
        `getLocations` in interface `InputSplit`
      Overrides:
        `getLocations` in class `CombineFileSplit`
      Returns:
        a new array of the node nodes.
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `CombineFileSplit`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.