title: how to set custom input format in MapReduce?
body: <p>I am writing MapReduce program and using classes in org.apache.hadoop.mapred.*. Can anybody tell me cause of this error? My CustomInputFormat class extends InputFormat and I have overridden createRecordReader method. </p>
  
  <p>Signature of my CustomInputFormat is:</p>
  
  <pre><code>class ParagraphInputFormat extends InputFormat {
  
      @Override
      public RecordReader createRecordReader(InputSplit arg0,
          TaskAttemptContext arg1) throws IOException, InterruptedException {
          return new CustomRecordReader();
      }
  
      @Override
      public List&lt;InputSplit&gt; getSplits(JobContext arg0) throws IOException,
          InterruptedException {
          // TODO Auto-generated method stub
          return null;
      }
  
  }
  </code></pre>
  
  <p>And Signature of CustomRecordReader is  <code>class CustomRecordReader extends RecordReader </code></p>
  
  <p>While declaring this class I used org.apache.hadoop.mapreduce.<em>. I am confused between org.apache.hadoop.mapred.</em> and org.apache.hadoop.mapreduce.*. Eclipse keeps on showing deprecated messages sometimes. I heard that apache has added some classes then removed those and then again added previous classes. Is is due to that? Is it affecting my code?  </p>
  
  <pre><code>JobConf conf = new JobConf(new Configuration(),MyMRJob.class);
          conf.setJobName("NameofJob");
  
          conf.setOutputKeyClass(CutomeKeyClass.class); //no error to this line
          conf.setOutputValueClass(IntWritable.class);
  
          conf.setMapperClass(MYMap.class);
          conf.setCombinerClass(MyReduce.class);
          conf.setReducerClass(MyReduce.class);
  
  
          conf.setInputFormat(CustomInputFormat.class);//ERROR to this line while typing
          conf.setOutputFormat(IntWritable.class);
  
          FileInputFormat.setInputPaths(conf, new Path(args[0]));
          FileOutputFormat.setOutputPath(conf, new Path(args[1]));
  
          JobClient.runJob(conf);
  </code></pre>