title: reading parameter in hadoop mapreduce
body: <p>I am new to hadoop mapreduce.I am trying to implement search in map reduce so my input file is like this</p>
  
  <pre><code>key1 value1,value3
  key2 value2,value6
  </code></pre>
  
  <p>I want to find values list for key which user will pass as command line argument.for this my main (driver) class is like this </p>
  
  <pre><code>public static void main(String[] args) {
      JobClient client = new JobClient();
      JobConf conf = new JobConf(NameSearchJava.class);
  
  // write now I am trying with writing search key in code (Joy),later I'll 
  //try to pass argument while running job from hadoop.
  
      conf.set("searcKey", "Joy"); 
      conf.setJobName("Search");
  
      conf.setOutputKeyClass(Text.class);
      conf.setOutputValueClass(Text.class);
  
      FileInputFormat.setInputPaths(conf, new Path(args[0]));
      FileOutputFormat.setOutputPath(conf, new Path(args[1]));
  
  
      conf.setMapperClass(SearchMapper.class);
  
      conf.setReducerClass(SearchReducer.class);
      client.setConf(conf);
  
      try {
        JobClient.runJob(conf);
      } catch (Exception e) {
        e.printStackTrace();
      }
    }
  }
  
  and my configure function is:
  
        String item ;
        public void configure(JobConf job) {
            {
             item = job.get("test");
            System.out.println(item);
            System.err.println("search" + item);
            }
  </code></pre>
  
  <p>where should I write configure function in Mapper or Reducer.How can I use this item parameter to do comparison in reducer .Is this the correct way to take parameters in hadoop ?</p>