栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

查看 application 某一个 container 的日志

查看 application 某一个 container 的日志

yarn logs 参数如下:

Retrieve logs for completed YARN applications.
usage: yarn logs -applicationId  [OPTIONS]

general options are:
 -am              Prints the AM Container logs for this
                                 application. Specify comma-separated
                                 value to get logs for related AM
                                 Container. For example, If we specify -am
                                 1,2, we will get the logs for the first
                                 AM Container as well as the second AM
                                 Container. To get logs for all AM
                                 Containers, use -am ALL. To get logs for
                                 the latest AM Container, use -am -1. By
                                 default, it will only print out syslog.
                                 Work with -logFiles to get other logs
 -appOwner    AppOwner (assumed to be current user if
                                 not specified)
 -containerId      ContainerId. By default, it will only
                                 print syslog if the application is
                                 runing. Work with -logFiles to get other
                                 logs.
 -help                           Displays help for all commands.
 -logFiles        Work with -am/-containerId and specify
                                 comma-separated value to get specified
                                 container log files. Use "ALL" to fetch
                                 all the log files for the container.
 -nodeAddress      NodeAddress in the format nodename:port
如果我们获取 hive 用户的 application_1635501674014_9264 的 am 的全部日志。
yarn logs -applicationId application_1635501674014_9264  
  -containerId container_1635501674014_9264_01_000001  
  -appOwner hive -nodeAddress ng5131090-core-instance-oa6q4tws-52.novalocal 
   > application_1635501674014_9264_am.log

默认是获取所有日志。可以获取某种日志,日志的种类有 directory.info、 launch_container.sh、stderr、stdout、syslog

如果获取 syslog 日志,可以加上 -logfiles 参数(发现 hadoop 2.7 根本没有解析这个参数)
yarn logs -applicationId application_1635501674014_9264  
  -containerId container_1635501674014_9264_01_000001  
  -appOwner hive -nodeAddress ng5131090-core-instance-oa6q4tws-52.novalocal 
  -logfiles syslog 
   > application_1635501674014_9264_am_syslog.log

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/487581.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号