On Dec 5, 2008, at 12:32 PM, Craig Macdonald wrote:
I have a related question - I have a class which is both mapper and reducer. How can I tell in configure() if the current task is map or a reduce task? Parse the taskid?
Get the taskid, then use http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/TaskAttemptID.html#forName(java.lang.String) followed by http://hadoop.apache.org/core/docs/current/api/org/apache/hadoop/mapred/TaskAttemptID.html#isMap() Arun
