public static class MultiFileWordCount.MyInputFormat extends MultiFileInputFormat<MultiFileWordCount.WordOffset,Text>
MultiFileInputFormat
, one should extend it, to return a
(custom) RecordReader
. MultiFileInputFormat uses
MultiFileSplit
s.LOG
Constructor and Description |
---|
MyInputFormat() |
Modifier and Type | Method and Description |
---|---|
RecordReader<MultiFileWordCount.WordOffset,Text> |
getRecordReader(InputSplit split,
JobConf job,
Reporter reporter)
Get the
RecordReader for the given InputSplit . |
getSplits
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, isSplitable, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize
public RecordReader<MultiFileWordCount.WordOffset,Text> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException
InputFormat
RecordReader
for the given InputSplit
.
It is the responsibility of the RecordReader
to respect
record boundaries while processing the logical split to present a
record-oriented view to the individual task.
getRecordReader
in interface InputFormat<MultiFileWordCount.WordOffset,Text>
getRecordReader
in class MultiFileInputFormat<MultiFileWordCount.WordOffset,Text>
split
- the InputSplit
job
- the job that this split belongs toRecordReader
IOException
Copyright © 2010 The Apache Software Foundation