@InterfaceAudience.Private @InterfaceStability.Unstable public class DelegatingInputFormat<K,V> extends InputFormat<K,V>
InputFormat
that delegates behavior of paths to multiple other
InputFormats.构造器和说明 |
---|
DelegatingInputFormat() |
限定符和类型 | 方法和说明 |
---|---|
RecordReader<K,V> |
createRecordReader(InputSplit split,
TaskAttemptContext context)
Create a record reader for a given split.
|
List<InputSplit> |
getSplits(JobContext job)
Logically split the set of input files for the job.
|
public List<InputSplit> getSplits(JobContext job) throws IOException, InterruptedException
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. The InputFormat
also creates the RecordReader
to read the InputSplit
.
getSplits
在类中 InputFormat<K,V>
job
- job configuration.InputSplit
s for the job.IOException
InterruptedException
public RecordReader<K,V> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
InputFormat
RecordReader.initialize(InputSplit, TaskAttemptContext)
before
the split is used.createRecordReader
在类中 InputFormat<K,V>
split
- the split to be readcontext
- the information about the taskIOException
InterruptedException
Copyright © 2009 The Apache Software Foundation