This has worked for me:
jobconf.getInt( "mapred.task.partition",  0);
in the reducer.





________________________________
From: abc xyz <[email protected]>
To: [email protected]
Cc: [email protected]
Sent: Thu, July 8, 2010 9:56:20 AM
Subject: getting the partition number in a reducer to which a key-value pair 
belongs

Hello everyone,
when i am processing a given key-{set of values} pair in reducer function, how 
can I get the partition number to which this key-{set of values} belong to? How 
is it possible to get this partition number without adding extra information 
about the partition number with each key-value pair during partitioning?
Cheers


      

Reply via email to