FAQ
Hello,

Is it possible to know the unique id of a reducer inside the reduce or setup
method of a reducer class? I tried to find any method of the context class
which might help in this regard but could not get any.

Thanks,
Farhan

Search Discussions

  • Gang Luo at Apr 27, 2010 at 12:04 am
    JobConf.get("mapred.task.id") gives you everything (including attempt id).

    -Gang


    ----- 原始邮件 ----
    发件人: Farhan Husain <farhan.husain@csebuet.org>
    收件人: common-user@hadoop.apache.org
    发送日期: 2010/4/26 (周一) 7:13:03 下午
    主 题: Reducer ID

    Hello,

    Is it possible to know the unique id of a reducer inside the reduce or setup
    method of a reducer class? I tried to find any method of the context class
    which might help in this regard but could not get any.

    Thanks,
    Farhan
  • Amareshwari Sri Ramadasu at Apr 27, 2010 at 3:35 am
    context.getTaskAttemptID() gives the task attempt id and context,getTaskAttemptID().getTaskID() gives the task id of the reducer.
    Context.getTaskAttemptID().getTaskID().getId() gives the reducer number.

    Thanks
    Amareshwari

    On 4/27/10 5:34 AM, "Gang Luo" wrote:

    JobConf.get("mapred.task.id") gives you everything (including attempt id).

    -Gang


    ----- 原始邮件 ----
    发件人: Farhan Husain <farhan.husain@csebuet.org>
    收件人: common-user@hadoop.apache.org
    发送日期: 2010/4/26 (周一) 7:13:03 下午
    主 题: Reducer ID

    Hello,

    Is it possible to know the unique id of a reducer inside the reduce or setup
    method of a reducer class? I tried to find any method of the context class
    which might help in this regard but could not get any.

    Thanks,
    Farhan
  • Farhan Husain at Apr 27, 2010 at 4:57 pm
    Thanks!

    2010/4/26 Amareshwari Sri Ramadasu <amarsri@yahoo-inc.com>
    context.getTaskAttemptID() gives the task attempt id and
    context,getTaskAttemptID().getTaskID() gives the task id of the reducer.
    Context.getTaskAttemptID().getTaskID().getId() gives the reducer number.

    Thanks
    Amareshwari

    On 4/27/10 5:34 AM, "Gang Luo" wrote:

    JobConf.get("mapred.task.id") gives you everything (including attempt id).

    -Gang


    ----- 原始邮件 ----
    发件人: Farhan Husain <farhan.husain@csebuet.org>
    收件人: common-user@hadoop.apache.org
    发送日期: 2010/4/26 (周一) 7:13:03 下午
    主 题: Reducer ID

    Hello,

    Is it possible to know the unique id of a reducer inside the reduce or
    setup
    method of a reducer class? I tried to find any method of the context class
    which might help in this regard but could not get any.

    Thanks,
    Farhan




Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedApr 26, '10 at 11:13p
activeApr 27, '10 at 4:57p
posts4
users3
websitehadoop.apache.org...
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase