Hadoop yarn调试

来源:互联网 发布:想在淘宝上开店 编辑:程序博客网 时间:2024/05/18 01:34

ResourceManager

  • Update log level

http://headnodehost:9014/logLevel

  • Download log file

Find the log url by the application page

curl -O http://headnodehost:9014/logs/yarn-resourcemanager-HEADNODE0.log

Application Master

  • Update log level

yarn.app.mapreduce.am.log.level

Similar configuration parameter:am.

dfs.namenode.logging.level
mapreduce.map.log.level
mapreduce.reduce.log.level

  • Download log file

application is not finished

curl http://workernode24.zampdmphdp.b1.internal.chinacloudapp.cn:30060/node/containerlogs/container_1438609276772_0006_01_000001/wankun/syslog/?start=0 > am.log

application is finished :

yarn application -listusage: yarn logs -applicationId <application ID> [OPTIONS]general options are: -appOwner <Application Owner>   AppOwner (assumed to be current user if                                 not specified) -containerId <Container ID>     ContainerId (must be specified if node                                 address is specified) -nodeAddress <Node Address>     NodeAddress in the format nodename:port                                 (must be specified if container id is                                 specified)

Eg:

yarn logs -applicationId application_1438609276772_0008 -containerId container_1438609276772_0008_01_000001 -nodeAddress workernode19.zampdmphdp.b1.internal.chinacloudapp.cn > success.log

Note

  • If windows system
sed -i "s/&lt;/</g" am.log sed -i "s/&gt;/>/g" am.log sed -i "s/^M//g" am.log
0 0