Package org.apache.hadoop.mapreduce
Class InputSplit
java.lang.Object
org.apache.hadoop.mapreduce.InputSplit
- Direct Known Subclasses:
CombineFileSplit,CompositeInputSplit,FileSplit,FileSplit
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract longGet the size of the split, so that the input splits can be sorted by size.Gets info about which nodes the input split is stored on and how it is stored at each location.abstract String[]Get the list of nodes by name where the data for the split would be local.
-
Constructor Details
-
InputSplit
public InputSplit()
-
-
Method Details
-
getLength
Get the size of the split, so that the input splits can be sorted by size.- Returns:
- the number of bytes in the split
- Throws:
IOExceptionInterruptedException
-
getLocations
Get the list of nodes by name where the data for the split would be local. The locations do not need to be serialized.- Returns:
- a new array of the node nodes.
- Throws:
IOExceptionInterruptedException
-
getLocationInfo
Gets info about which nodes the input split is stored on and how it is stored at each location.- Returns:
- list of
SplitLocationInfos describing how the split data is stored at each location. A null value indicates that all the locations have the data stored on disk. - Throws:
IOException
-