title: can you explain word count mapreduce program step by step
body: <p>Can you explain any map reduce program. for example in word count program class in class is innerclass. can you explain the program step by step. what is the meaning of angle bracket. why we are writing output parameters also. what is context object. Like that can you explain the program step by step. I know logic but I can't understand few Java statements</p>
  
  <pre><code>public class WordCount {
  
  public static class Map extends Mapper&lt;LongWritable, Text, Text, IntWritable&gt; {
     private final static IntWritable one = new IntWritable(1);
     private Text word = new Text();
  
     public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
         String line = value.toString();
         StringTokenizer tokenizer = new StringTokenizer(line);
         while (tokenizer.hasMoreTokens()) {
             word.set(tokenizer.nextToken());
             context.write(word, one);
         }
     }
  } 
  
  public static class Reduce extends Reducer&lt;Text, IntWritable, Text, IntWritable&gt; {
  
     public void reduce(Text key, Iterable&lt;IntWritable&gt; values, Context context) 
       throws IOException, InterruptedException {
         int sum = 0;
         for (IntWritable val : values) {
             sum += val.get();
         }
         context.write(key, new IntWritable(sum));
     }
  }
  
  public static void main(String[] args) throws Exception {
     Configuration conf = new Configuration();
  
         Job job = new Job(conf, "wordcount");
  
     job.setOutputKeyClass(Text.class);
     job.setOutputValueClass(IntWritable.class);
  
     job.setMapperClass(Map.class);
     job.setReducerClass(Reduce.class);
  
     job.setInputFormatClass(TextInputFormat.class);
     job.setOutputFormatClass(TextOutputFormat.class);
  
     FileInputFormat.addInputPath(job, new Path(args[0]));
     FileOutputFormat.setOutputPath(job, new Path(args[1]));
  
     job.waitForCompletion(true);
  }
  
  }
  </code></pre>