org.apache.hadoop.mapred.gridmix
Class SleepJob.SleepInputFormat
java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.LongWritable>
org.apache.hadoop.mapred.gridmix.SleepJob.SleepInputFormat
- Enclosing class:
- SleepJob
public static class SleepJob.SleepInputFormat
- extends InputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.LongWritable>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SleepJob.SleepInputFormat
public SleepJob.SleepInputFormat()
getSplits
public List<InputSplit> getSplits(JobContext jobCtxt)
throws IOException
- Description copied from class:
InputFormat
- Logically split the set of input files for the job.
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
.
- Specified by:
getSplits
in class InputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.LongWritable>
- Parameters:
jobCtxt
- job configuration.
- Returns:
- an array of
InputSplit
s for the job.
- Throws:
IOException
createRecordReader
public RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.LongWritable> createRecordReader(InputSplit split,
TaskAttemptContext context)
throws IOException,
InterruptedException
- Description copied from class:
InputFormat
- Create a record reader for a given split. The framework will call
RecordReader.initialize(InputSplit, TaskAttemptContext)
before
the split is used.
- Specified by:
createRecordReader
in class InputFormat<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.LongWritable>
- Parameters:
split
- the split to be readcontext
- the information about the task
- Returns:
- a new record reader
- Throws:
IOException
InterruptedException
Copyright © 2009 The Apache Software Foundation