Hi Gang,
You have to load the XML config file in your M/R code.
Something like this:
FSDataInputStream inS = fs.open(in);
conf.addResource(inS);
Where "conf" is your Configuration.
This will in effect read all the parameters from that XML and override anything
that you have previously set with:
conf.set("parameter",parameterValue);
regards,
Eric Arenas
----- Original Message ----
From: Gang Luo <[email protected]>
To: [email protected]
Sent: Thu, February 4, 2010 6:14:54 AM
Subject: Re: configuration file
I give the path to that xml file in that command. Do I need to add that path to
classpath? I try to give a wrong path, there is no error reported.
Aren't those parameters all configurable? like io.sort.mb, mapred.reduce.tasks,
io.sort.factor, etc.
Thanks.
-Gang
----- 原始邮件 ----
发件人: Amogh Vasekar <[email protected]>
收件人: "[email protected]" <[email protected]>
发送日期: 2010/2/4 (周四) 6:09:04 上午
主 题: Re: configuration file
Hi,
A shot in the dark, is the conf file in your classpath? If yes, are the
parameters you are trying to override marked final?
Amogh
On 2/4/10 3:18 AM, "Gang Luo" <[email protected]> wrote:
Hi,
I am writing script to run whole bunch of jobs automatically. But the
configuration file doesn't seems working. I think there is something wrong in
my command.
The command is my script is like:
bin/hadoop jar myJarFile myClass -conf myConfigurationFilr.xml arg1 agr2 ....
I use conf.get() so show the value of some parameters. But the values are not
what I define in that xml file. Is there something wrong?
Thanks.
-Gang
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/