title: How to set hadoop input format to NLineInputFormat?
body: <p>I am trying to limit the number of lines each of the Mappers gets.
  My code goes like this:</p>
  
  <pre><code>    package com.iathao.mapreduce;
  
      import java.io.IOException;
      import java.net.MalformedURLException;
  
      import org.apache.hadoop.fs.Path;
      import org.apache.hadoop.io.IntWritable;
      import org.apache.hadoop.io.Text;
      import org.apache.hadoop.mapred.lib.NLineInputFormat;
      import org.apache.hadoop.mapreduce.Job;
      import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
      import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
      import org.apache.regexp.RESyntaxException;
  
      import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
  
      public class Main {
  
  
      public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException, RESyntaxException {
  
      try {
          if (args.length != 2) {
              System.err.println("Usage: NewMaxTemperature &lt;input path&gt; &lt;output path&gt;");
              System.exit(-1);
          }
          Job job = new Job();
          job.setJarByClass(Main.class);
          job.getConfiguration().set("mapred.max.map.failures.percent", "100");
          // job.getConfiguration().set("mapred.map.max.attempts", "10");
          //NLineInputFormat. .setNumLinesPerSplit(job, 1);
          job.setInputFormatClass(NLineInputFormat.class);
  </code></pre>
  
  <p>At the last line in the sample (job.setInputFormatClass(NLineInputFormat.class);) I get following error:</p>
  
  <pre><code>The method setInputFormatClass(Class&lt;? extends InputFormat&gt;) in the type Job is not applicable for the arguments (Class&lt;NLineInputFormat&gt;)
  </code></pre>
  
  <p>Did I somehow get the wrong NLineInputFormat class?</p>