您的位置:首页 > 编程语言 > Java开发

关于mapreduce.map.java.opts

2016-01-21 10:47 656 查看
a)   Update the property in relevant mapred-site.xml(from where client load the config).

b) Import the mapred-site.xml configuration file in the job startup command line using "-conf mapred-site.xml"

For example: yarn jar hadoop-example.jar sleep -conf /mapreduce/conf/mapred-site.xml -m 1 -r 1 -mt 1000 -rt 1000

The priority of the configuration in -conf mapred-site.xml has higher priority than (a).

c) Run the MapReduce job in command line using -DpropertyName=propertyValue to import the property.

d) In the MapReduce client code, use conf.set(name, value) to set the property.    

 

这个配置是客户端参数,也就是提交作业的机器上的mapred-site.xml配置,可能是不同用户在不同节点上提交的,有些节点没有更新。

注意,这个配置与集群中节点没关系,与提交作业的机器有关。

此外,这个参数也可以由用户定制,每个作业可以单独设置,可能有些人自己做了修改。

有关这个参数,一开始我理解不够,当前的集群中配置文件 mapred-site.xml中启用了大页面,我在操作去掉大页面的过程中,替换了所有mapred-site.xml

中使用大页面的参数Xlp(ibm jdk). 但是在检查的时候 pdsh –w nodelist –w ‘ps –ef | grep attempt | grep –v grep ‘还是发现了在用大页面的作业存在。

发现有一些应用自己指定了mapreduce.map.java.opts,它是通过打包旧的配置文件来实现的。

hadoop jar $myjar mainclass –Dmapreduce.map.java.opts=”-server –Xms500m –Xmx500m” args

类似的参数还有mapreduce.reduce.java.opts
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: