Class NMapInputFormat
java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable>
org.apache.hadoop.hbase.mapreduce.NMapInputFormat
public class NMapInputFormat
extends org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable>
Input format that creates a configurable number of map tasks each provided with a single row of
NullWritables. This can be useful when trying to write mappers which don't have any real input
(eg when the mapper is simply producing random data as output)
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,
org.apache.hadoop.io.NullWritable> createRecordReader
(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext tac) static int
getNumMapTasks
(org.apache.hadoop.conf.Configuration conf) List<org.apache.hadoop.mapreduce.InputSplit>
getSplits
(org.apache.hadoop.mapreduce.JobContext context) static void
setNumMapTasks
(org.apache.hadoop.conf.Configuration conf, int numTasks)
-
Field Details
-
NMAPS_KEY
- See Also:
-
-
Constructor Details
-
NMapInputFormat
public NMapInputFormat()
-
-
Method Details
-
createRecordReader
public org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext tac) - Specified by:
createRecordReader
in classorg.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.NullWritable,
org.apache.hadoop.io.NullWritable>
-
getSplits
public List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context) - Specified by:
getSplits
in classorg.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.NullWritable,
org.apache.hadoop.io.NullWritable>
-
setNumMapTasks
-
getNumMapTasks
-