You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by kauu <my...@yahoo.com.cn> on 2007/12/19 08:30:59 UTC
How can I get parameters form mappers ?
How can I get parameters form mappers ?
I can't do it with jobconf, I've try it
.
-----邮件原件-----
发件人: redpony@gmail.com
[mailto:redpony@gmail.com] 代表 Chris Dyer
发送时间: 2007年11月7日 6:04
收件人: hadoop-user@lucene.apache.org;
stuhood@webmail.us
主题: Re: configuration for mappers?
Hi Stu- Thanks for the tip!
Chris
On 11/3/07, Stu Hood
<st...@webmail.us> wrote:
>
> Hi Chris,
>
> A very comfortable way to pass
configuration parameters to mappers is in
> your JobConf. By using
JobConf.set(String,String), you can set arbitrary
> parameters that will be distributed
to all mappers.
>
> In order to fetch these parameters
in your Mapper, you will need to
> override the
MapReduceBase.configure(JobConf) method. The default
> implementation of this method in
MapReduceBase does nothing with the
> configuration, but you can
implement it to change the configuration of the
> mapper by .get(String)'ing the
parameters you stored and setting private
> variables, etc.
>
> Good luck!
>
> Thanks,
> Stu
>
>
> -----Original Message-----
> From: Chris Dyer
<re...@umd.edu>
> Sent: Saturday, November 3, 2007
5:42pm
> To: hadoop-user@lucene.apache.org
> Subject: configuration for mappers?
>
> Hi hadoopers,
>
> What is the recommended way to send
configuration type information
> from the job client down to the
individual map and reduce processes
> that are running? I'd like to be able to specify a few options
that
> control the behavior of these
processes, but I haven't been able to
> find any documentation on how to do
this.
>
> Thanks for any help!
>
> Chris
>
>
>
___________________________________________________________
雅虎邮箱传递新年祝福,个性贺卡送亲朋!
http://cn.mail.yahoo.com/gc/index.html?entry=5&souce=mail_mailletter_tagline