Yarn AppMaste调试

一般都是这种形式,YARN_OPTS="$YARN_OPTS $YARN_CLIENT_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=8792,server=y,suspend=y "


但是MRMaster不知道加在哪里,查看了封神的博客后,恍然大悟,

http://fengshenwu.com/blog/tag/hadoop2yarn/


AM需要在配置文件mapred-site.xml配置:

<property>
  <name>yarn.app.mapreduce.am.command-opts</name>
  <value>-Xmx1000m -Xdebug -Xrunjdwp:transport=dt_socket,address=5555,server=y,suspend=n</value>
</property>
加上后,查看:

[liuqiang@localhost container_1395565534919_0001_01_000001]$ pwd
/home/liuqiang/hadoop-2.2.0/logs/userlogs/application_1395565534919_0001/container_1395565534919_0001_01_000001
[liuqiang@localhost container_1395565534919_0001_01_000001]$ cat stdout
Listening for transport dt_socket at address: 8792


OK

你可能感兴趣的:(yarn)