org.apache.hadoop.mapred
Class MultiFileInputFormat
java.lang.Object
org.apache.hadoop.mapred.FileInputFormat
org.apache.hadoop.mapred.MultiFileInputFormat
- All Implemented Interfaces:
- InputFormat
public abstract class MultiFileInputFormat
- extends FileInputFormat
An abstract InputFormat
that returns MultiFileSplit
's
in getSplits(JobConf, int)
method. Splits are constructed from
the files under the input paths. Each split returned contains nearly
equal content length.
Subclasses implement getRecordReader(InputSplit, JobConf, Reporter)
to construct RecordReader
's for MultiFileSplit
's.
- See Also:
MultiFileSplit
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiFileInputFormat
public MultiFileInputFormat()
getSplits
public InputSplit[] getSplits(JobConf job,
int numSplits)
throws IOException
- Description copied from class:
FileInputFormat
- Splits files returned by
FileInputFormat.listPaths(JobConf)
when
they're too big.
- Specified by:
getSplits
in interface InputFormat
- Overrides:
getSplits
in class FileInputFormat
- Parameters:
job
- the job whose input files are to be splitnumSplits
- the desired number of splits
- Returns:
- the splits
- Throws:
IOException
getRecordReader
public abstract RecordReader getRecordReader(InputSplit split,
JobConf job,
Reporter reporter)
throws IOException
- Description copied from interface:
InputFormat
- Construct a
RecordReader
for a FileSplit
.
- Specified by:
getRecordReader
in interface InputFormat
- Specified by:
getRecordReader
in class FileInputFormat
- Parameters:
split
- the InputSplit
job
- the job that this split belongs to
- Returns:
- a
RecordReader
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation