Interface InputSplit

All Superinterfaces:
Writable
All Known Subinterfaces:
InputSplitWithLocationInfo
All Known Implementing Classes:
CombineFileSplit, CompositeInputSplit, FileSplit, MultiFileSplit

@Public @Stable public interface InputSplit extends Writable
InputSplit represents the data to be processed by an individual Mapper.

Typically, it presents a byte-oriented view on the input and is the responsibility of RecordReader of the job to process this and present a record-oriented view.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Get the total number of bytes in the data of the InputSplit.
    Get the list of hostnames where the input split is located.

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

    readFields, write
  • Method Details

    • getLength

      long getLength() throws IOException
      Get the total number of bytes in the data of the InputSplit.
      Returns:
      the number of bytes in the input split.
      Throws:
      IOException
    • getLocations

      String[] getLocations() throws IOException
      Get the list of hostnames where the input split is located.
      Returns:
      list of hostnames where data of the InputSplit is located as an array of Strings.
      Throws:
      IOException