title: Hadoop and MapReduce
body: <p>I am new to HDFS and MapReduce and trying to calculate survey statistics. Input file is in this format: Age Points Sex Category - all 4 of them are numbers. Is this the correct start:</p>
  
  <pre><code>    public static class MapClass extends MapReduceBase
      implements Mapper&lt;IntWritable, IntWritable, IntWritable, IntWritable&gt; {
      private final static IntWritable Age = new IntWritable(1) ;
      private IntWritable AgeCount = new IntWritable() ;
  
      public void map( Text key, Text value,
                      OutputCollector&lt;IntWritable, IntWritable&gt; output,
                      Reporter reporter) throws IOException {
          AgeCount. set(Integer. parseInt(value. toString() ) ) ;
          output. collect(AgeCount, Age) ;
      }
  }
  </code></pre>
  
  <p>My questions:
  1. Is this a correct start?
  2. If I want to collect for other attributes like Sex,Points - will I just add another output.collect statements? I know I have to read the line and split into attributes.
  3. Where it says implements Mapper - I made all 4 IntWritable is it correct?</p>