hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamal sasha <jamalsha...@gmail.com>
Subject objects as key/values
Date Tue, 30 Jul 2013 02:26:45 GMT
Ok.
  A very basic (stupid) question.
I am trying to compute mean using hadoop.

So my implementation is like this:

public class Mean
 public static class Pair{
  //simple class to create object
}
 public class MeanMapper<LongWritable, Text,Text, Pair>
   emit(text,pair) //where pair is (local sum, count)

 public class MeanReducer<Text, Pair, Text DoubleWritable>
    emit (text, mean)

Unfortunately such approach of creating custom class types are not working
since in job I have to set the output type for mapper/reducer...
How are custom key values pair implemented in hadoop?

Mime
View raw message