简体   繁体   English

如何将JMX JVM选项传递给Hadoop Mapper和Reducer

[英]How to pass JMX JVM options to Hadoop Mapper and Reducer

I'd like to turn on JMX for all my Hadoop mappers and reducers. 我想为我所有的Hadoop映射器和简化器打开JMX。

To do so, I need to add the following options as JVM options to the mapper/reducer JVMs: 为此,我需要将以下选项作为JVM选项添加到映射器/还原器JVM:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=0
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

How can I do this from the Hadoop command line? 如何从Hadoop命令行执行此操作?

I know I can add JVM options to the mapper/reducer by adding: 我知道我可以通过添加以下内容将JVM选项添加到映射器/缩减器:

-D mapreduce.map.java.opts=<an option> -D mapreduce.reduce.java.opts=<an option>

and that will pass <an option> to the JVMs. 并且会将<an option>传递给JVM。

How do I add the entire JMX options list from above. 如何从上方添加整个JMX选项列表。 Will the following work? 请问以下工作?

-D mapreduce.map.java.opts="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" -D mapreduce.reduce.java.opts="<same as for map>"

I couldn't find any documentation or examples with helpful information. 我找不到任何包含有用信息的文档或示例。

Yes. 是。

If you run the command from the question, it will add all the properties to the mapper/reducer JVM. 如果从问题中运行命令,它将把所有属性添加到映射器/缩减器JVM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM