title: Reducer not working in Hadoop Mapreduce
body: <p>Hi My Reducer is not printing the desired result please have a look at the code.</p>
  
  <p>This is my map function    </p>
  
  <pre><code>public  void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException 
          {   
  
              String str_line = value.toString();
              Detail_output1_column_array = str_line.split("\\"+tabSpace);
  
  
              Outputkey = Detail_output1_column_array[2];
              System.out.println(Outputkey);
              context.write(new Text(Outputkey),NullWritable.get());
          }
      }
  
      public  static class ShopFile_Reducer extends Reducer&lt;Text,Iterable&lt;NullWritable&gt;,NullWritable,Text&gt; {
  
  
          public void reduce(Text Key,Iterable&lt;NullWritable&gt; Values,Context context) throws IOException, InterruptedException {
  
  
  
              Key = new Text(Key.toString());
              context.write(NullWritable.get(),new Text(Key));
  
          }
  
      }
  </code></pre>
  
  <p>Suppose Detail_output1_column_array[2] contains
  01
  01
  01
  02
  01
  02
  01
  03
  01</p>
  
  <p>After reducer I need the output like this
  01
  02
  03 </p>
  
  <p>But it is printing every thing
  01
  01
  01
  02
  01
  02
  01
  03
  01</p>
  
  <p>This is my driver class</p>
  
  <pre><code>Configuration Shopconf = new Configuration();
          Shopconf.setStrings("DTGroup_input",DTGroup_input);
          Job Shop = new Job(Shopconf,"Export_Column_Mapping");
          Shop.setJarByClass(ExportColumnMapping.class);
          Shop.setJobName("ShopFile_Job");
          Shop.setMapperClass(ShopFile_Mapper.class);
          Shop.setReducerClass(ShopFile_Reducer.class);
          Shop.setInputFormatClass(TextInputFormat.class);
          Shop.setOutputFormatClass(TextOutputFormat.class);
          Shop.setMapOutputKeyClass(Text.class);
          Shop.setMapOutputValueClass(NullWritable.class);
          Shop.setOutputKeyClass(Text.class);
          Shop.setOutputValueClass(Text.class);
          FileInputFormat.addInputPath(Shop, new Path(outputpath+"/Detailsfile/part*"));
          FileOutputFormat.setOutputPath(Shop, new Path(outputpath+"/Shopfile"));
          Shop.waitForCompletion(true);
  </code></pre>