@InterfaceAudience.Private @InterfaceStability.Unstable public class DelegatingInputFormat<K,V> extends Object implements InputFormat<K,V>
InputFormat that delegates behaviour of paths to multiple other
InputFormats.| Constructor and Description |
|---|
DelegatingInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
RecordReader<K,V> |
getRecordReader(InputSplit split,
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.
|
public InputSplit[] getSplits(JobConf conf, int numSplits) throws IOException
InputFormatEach 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 in interface InputFormat<K,V>conf - job configuration.numSplits - the desired number of splits, a hint.InputSplits for the job.IOExceptionpublic RecordReader<K,V> getRecordReader(InputSplit split, JobConf conf, Reporter reporter) throws IOException
InputFormatRecordReader 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<K,V>split - the InputSplitconf - the job that this split belongs toRecordReaderIOExceptionCopyright © 2022 Apache Software Foundation. All rights reserved.