public static class SleepJob.SleepInputFormat extends org.apache.hadoop.conf.Configured implements InputFormat<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable>
| Constructor and Description |
|---|
SleepJob.SleepInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.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.
|
public InputSplit[] getSplits(JobConf conf, int numSplits)
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<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable>conf - job configuration.numSplits - the desired number of splits, a hint.InputSplits for the job.public RecordReader<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable> getRecordReader(InputSplit ignored, JobConf conf, Reporter reporter) throws java.io.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<org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.IntWritable>ignored - the InputSplitconf - the job that this split belongs toRecordReaderjava.io.IOExceptionCopyright © 2009 The Apache Software Foundation