hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amareshwari Sri Ramadasu <amar...@yahoo-inc.com>
Subject Re: Reducer output records = 0? (0.20.1)
Date Wed, 21 Oct 2009 20:10:15 GMT
That was bug in 0.20. Got fixed in 0.20.2 through MAPREDUCE-112

Thanks
Amareshwari

tim robertson wrote:
> Hi all,
>
> I have a Reducer with the following (using new API):
>
>     public static class Transpose extends Reducer<Text, IntWritable,
> IntWritable, Text> {
>         @Override
>         protected void reduce(Text key, Iterable<IntWritable> values,
>                 Context context)
>                 throws IOException, InterruptedException {
>             int count = 0;
>             for (IntWritable i : values) {
>                 context.write(i, key);
>                 count++;
>             }
>             context.setStatus(key.toString() + " has values: " + count);
>         }
>     }
>
> when running, this reports correctly:
>   üksikute püriidistunud käikudega sinisavi has values: 2 > reduce
>
> but the always reports output records = 0.
>
> The job is launched:
>
> 	    Job job = new Job(conf, "ClassificationMapReduce");
> 	    job.setJarByClass(ClassificationMapReduce.class);
> 	    job.setMapperClass(ExtractClassification.class);
> 	    job.setReducerClass(Transpose.class);
> 	    job.setNumReduceTasks(9);
> 	
> 	    job.setMapOutputKeyClass(Text.class);
> 	    job.setMapOutputValueClass(IntWritable.class);
> 	    job.setOutputKeyClass(IntWritable.class);
> 	    job.setOutputValueClass(Text.class);
> 	
> 	    FileInputFormat.addInputPath(job, new Path(otherArgs[0]));
> 	    TextOutputFormat.setOutputPath(job, new Path(otherArgs[1]));
>
> Can someone please tell me where I am doing something wrong?
>
> Thanks
> Tim
>   


Mime
View raw message