On Tue, Dec 9, 2008 at 6:20 PM, Zheng Shao <[EMAIL PROTECTED]> wrote:
> > http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/Reducer.html > > public void configure(JobConf job) { > reduceTaskId = job.get("mapred.task.id"); > } I didn't try "mapred.task.id" but this worked for me- jobConf.getInt( "mapred.task.partition", 0) thanks, Taran > > > Zheng > -----Original Message----- > From: Tarandeep Singh [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 09, 2008 6:16 PM > To: [email protected] > Subject: How to find partition number in reducer > > Hi, > > I want to find out the partition number (which is being handled by the > reducer). I can use this- > HashPartitioner.getPartition( ...) but it takes "Key" as argument. > > Is there a way I can do something similar in configure( ) method (where I > have not got the Key yet) > > Thanks, > Taran >
