org.apache.hadoop.mapred
Interface InputSplit

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

@InterfaceAudience.Public
@InterfaceStability.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:
InputFormat, RecordReader

Method Summary
 long getLength()
          Get the total number of bytes in the data of the InputSplit.
 String[] getLocations()
          Get the list of hostnames where the input split is located.
 
Methods inherited from interface org.apache.hadoop.io.Writable
readFields, write
 

Method Detail

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


Copyright © 2014 Apache Software Foundation. All Rights Reserved.