public static class SleepJob.SleepInputFormat extends InputFormat<LongWritable,LongWritable>
Constructor and Description |
---|
SleepJob.SleepInputFormat() |
Modifier and Type | Method and Description |
---|---|
RecordReader<LongWritable,LongWritable> |
createRecordReader(InputSplit split,
TaskAttemptContext context)
Create a record reader for a given split.
|
List<InputSplit> |
getSplits(JobContext jobCtxt)
Logically split the set of input files for the job.
|
public List<InputSplit> getSplits(JobContext jobCtxt) throws IOException
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
in class InputFormat<LongWritable,LongWritable>
jobCtxt
- job configuration.InputSplit
s for the job.IOException
public RecordReader<LongWritable,LongWritable> createRecordReader(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
InputFormat
RecordReader.initialize(InputSplit, TaskAttemptContext)
before
the split is used.createRecordReader
in class InputFormat<LongWritable,LongWritable>
split
- the split to be readcontext
- the information about the taskIOException
InterruptedException
Copyright © 2013 Apache Software Foundation. All rights reserved.