org.apache.hadoop.streaming
Class StreamInputFormat

java.lang.Object
  extended by org.apache.hadoop.mapred.InputFormatBase
      extended by org.apache.hadoop.streaming.StreamInputFormat
All Implemented Interfaces:
InputFormat

public class StreamInputFormat
extends InputFormatBase

An input format that performs globbing on DFS paths and selects a RecordReader based on a JobConf property.

Author:
Michel Tourn

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

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG
Constructor Detail

StreamInputFormat

public StreamInputFormat()
Method Detail

getSplits

public InputSplit[] getSplits(JobConf job,
                              int numSplits)
                       throws IOException
Description copied from class: InputFormatBase
Splits files returned by InputFormatBase.listPaths(JobConf) when they're too big.

Specified by:
getSplits in interface InputFormat
Overrides:
getSplits in class InputFormatBase
Parameters:
job - the job whose input files are to be split
numSplits - the desired number of splits
Returns:
the splits
Throws:
IOException

getRecordReader

public RecordReader getRecordReader(InputSplit genericSplit,
                                    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 InputFormatBase
Parameters:
genericSplit - the InputSplit
job - the job that this split belongs to
Returns:
a RecordReader
Throws:
IOException


Copyright © 2006 The Apache Software Foundation