In my mapReduce program, i have to use a Partitionner :
public class TweetPartitionner extends HashPartitioner<Text, IntWritable>{
public int getPartition(Text a_key, IntWritable a_value, int a_nbPartitions) {
if(a_key.toString().startsWith("#"))
return 0;
else
return 1;
}
}
And I have set the number of reduce tasks : job.setNumReduceTasks(2);
But I get the following error : java.io.IOException: Illegal partition for #rescinfo (1)
The parameter a_nbPartitions returns 1.
I've read in another post : Hadoop: Number of reducer is not equal to what I have set in program that
Running it in eclipse seems to use the local job runner. It only supports 0 or 1 reducers. If you try to set it to use more than one reducer, it ignores it and just uses one anyway.
I developp on a Hadoop 0.20.2 installed on Cygwin and I of course use Eclipse. How can I do ?