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)
  • Field Details

  • Constructor Details

  • 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 class org.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 class org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.NullWritable,org.apache.hadoop.io.NullWritable>
    • setNumMapTasks

      public static void setNumMapTasks(org.apache.hadoop.conf.Configuration conf, int numTasks)
    • getNumMapTasks

      public static int getNumMapTasks(org.apache.hadoop.conf.Configuration conf)