hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zheng Shao <zs...@facebook.com>
Subject RE: How to find partition number in reducer
Date Wed, 10 Dec 2008 02:20:38 GMT
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");
       }


Zheng
-----Original Message-----
From: Tarandeep Singh [mailto:tarandeep@gmail.com] 
Sent: Tuesday, December 09, 2008 6:16 PM
To: core-user@hadoop.apache.org
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

Mime
View raw message