org.apache.hadoop.mapred
Class MultiFileInputFormat

java.lang.Object
  extended by org.apache.hadoop.mapred.FileInputFormat
      extended by 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

Field Summary
 
Fields inherited from class org.apache.hadoop.mapred.FileInputFormat
LOG
 
Constructor Summary
MultiFileInputFormat()
           
 
Method Summary
abstract  RecordReader getRecordReader(InputSplit split, JobConf job, Reporter reporter)
          Construct a RecordReader for a FileSplit.
 InputSplit[] getSplits(JobConf job, int numSplits)
          Splits files returned by FileInputFormat.listPaths(JobConf) when they're too big.
 
Methods inherited from class org.apache.hadoop.mapred.FileInputFormat
isSplitable, listPaths, setMinSplitSize, validateInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiFileInputFormat

public MultiFileInputFormat()
Method Detail

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 split
numSplits - 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