Change the name of the reduce method to be all lower case -- public void
reduce(...
Right now the compiler is complaining that you haven't overridden the
correct abstract method in the base class.
/ Per
On Sat, Nov 8, 2008 at 10:44 PM, pols cut [EMAIL PROTECTED] wrote:
I am trying to get a simple map reduce function going but getting the
following error. could anyone please help/guide me
filename.java is not abstract and does not override abstract method
reduceorg.apache.io.text,java.util.iteratororg.apache.hadoop.io.text,org.apache.hadoop.mapred.OutputCollectororg.apache.hadoop.io.Text.org.apache.hadoop.mapred.Reporter
in org.apache.hadoop.mapred.Reducer
public static class Reduce extends MapReduceBase implements
ReducerText,Text,Text,Text
My Map method is like this:
public static class map extends MapReduceBase implements
MapperLongWritable, Text, Text, Text
{
public void map(LongWritable key, Text value, OutputCollectorText, Text
output, Reporter reporter) throws IOException
{
output.collect(word_key,new Text(str1)); //output.collect(Text,Text)
}
}
public static class Reduce extends MapReduceBase implements ReducerText,
Text, Text, Text
{
public void Reduce(Text key, IteratorText values,
OutputCollectorText, Text output, Reporter reporter) throws IOException
{
output.collect(new Text(Test), new Text(Me));
}
}
configuration is like :
conf.setMapOutputKeyClass(Text.class);
conf.setMapOutputValueClass(Text.class);
conf.setOutputKeyClass(Text.class);
conf.setOutputValueClass(Text.class);
conf.setMapperClass(map.class);
conf.setCombinerClass(Reduce.class);
conf.setReducerClass(Reduce.class);
conf.setInputFormat(TextInputFormat.class);
conf.setOutputFormat(TextOutputFormat.class);
Add more friends to your messenger and enjoy! Go to
http://messenger.yahoo.com/invite/