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