@InterfaceAudience.Public @InterfaceStability.Stable public class NLineInputFormat extends FileInputFormat<LongWritable,Text> implements JobConfigurable
INPUT_DIR_RECURSIVE, LOG, NUM_INPUT_FILES
Constructor and Description |
---|
NLineInputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
configure(JobConf conf)
Initializes a new instance from a
JobConf . |
RecordReader<LongWritable,Text> |
getRecordReader(InputSplit genericSplit,
JobConf job,
Reporter reporter)
Get the
RecordReader for the given InputSplit . |
InputSplit[] |
getSplits(JobConf job,
int numSplits)
Logically splits the set of input files for the job, splits N lines
of the input as one split.
|
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, isSplitable, listStatus, makeSplit, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSize
public NLineInputFormat()
public RecordReader<LongWritable,Text> getRecordReader(InputSplit genericSplit, 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<LongWritable,Text>
getRecordReader
in class FileInputFormat<LongWritable,Text>
genericSplit
- the InputSplit
job
- the job that this split belongs toRecordReader
IOException
public InputSplit[] getSplits(JobConf job, int numSplits) throws IOException
getSplits
in interface InputFormat<LongWritable,Text>
getSplits
in class FileInputFormat<LongWritable,Text>
job
- job configuration.numSplits
- the desired number of splits, a hint.InputSplit
s for the job.IOException
FileInputFormat.getSplits(JobConf, int)
public void configure(JobConf conf)
JobConfigurable
JobConf
.configure
in interface JobConfigurable
conf
- the configurationCopyright © 2014 Apache Software Foundation. All Rights Reserved.