org.apache.hadoop.streaming
Class StreamInputFormat
java.lang.Object
org.apache.hadoop.mapred.InputFormatBase
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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static final org.apache.commons.logging.Log LOG
StreamInputFormat
public StreamInputFormat()
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 splitnumSplits
- 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