public static class SleepJob.SleepInputFormat extends Configured implements InputFormat<IntWritable,IntWritable>
构造器和说明 |
---|
SleepJob.SleepInputFormat() |
限定符和类型 | 方法和说明 |
---|---|
RecordReader<IntWritable,IntWritable> |
getRecordReader(InputSplit ignored,
JobConf conf,
Reporter reporter)
Get the
RecordReader for the given InputSplit . |
InputSplit[] |
getSplits(JobConf conf,
int numSplits)
Logically split the set of input files for the job.
|
getConf, setConf
public InputSplit[] getSplits(JobConf conf, int numSplits)
InputFormat
Each InputSplit
is then assigned to an individual Mapper
for processing.
Note: The split is a logical split of the inputs and the input files are not physically split into chunks. For e.g. a split could be <input-file-path, start, offset> tuple.
getSplits
在接口中 InputFormat<IntWritable,IntWritable>
conf
- job configuration.numSplits
- the desired number of splits, a hint.InputSplit
s for the job.public RecordReader<IntWritable,IntWritable> getRecordReader(InputSplit ignored, JobConf conf, 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
在接口中 InputFormat<IntWritable,IntWritable>
ignored
- the InputSplit
conf
- the job that this split belongs toRecordReader
IOException
Copyright © 2009 The Apache Software Foundation