hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Kozlov <ale...@cloudera.com>
Subject Re: System property in hadoop
Date Sat, 01 May 2010 01:22:44 GMT
Hi Deepika,

If you want to pass a java system property to a task running on a
tasktracker, you should set *mapred.child.java.opts *in a Hadoop
Configuration<http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/conf/Configuration.html>object
like:

*$ hadoop jar <your-jar> -D
mapred.child.java.opts="-Dmy.file.name<http://dmy.file.name/>=/abc/def.properties"
<parameters>

*Your main class has to call
ToolRunner.run()<http://hadoop.apache.org/common/docs/current/api/org/apache/hadoop/util/ToolRunner.html>
.

Let me know if this helps and have a nice weekend.

Alex K

On Fri, Apr 30, 2010 at 3:46 PM, Deepika Khera <Deepika.Khera@avg.com>wrote:

>  Hi,
>
>
>
> I want to add a Java System property that a running reduce task should be
> able to read . I added it to the hadoop-env.sh script in the HADOOP_OPTS.
>
>
>
> So, like
>
>
>
> export HADOOP_OPTS="-Dmy.file.name=/abc/def.properties"
>
>
>
> But still the task is not able to read the property (System.getProperty(“
> my.file.name”) in the reduce task fails ) . Am I missing something, is
> this not the right place to specify a java system property ?
>
>
>
> Thanks,
> Deepika
>

Mime
View raw message