YARN Resource Management
https://www.jianshu.com/p/b9245242472b
https://stackoverflow.com/questions/42637631/what-does-virtual-core-in-yarn-vcore-mean
https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_yarn-resource-management/content/enabling_cgroups.html
https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.5/bk_yarn-resource-management/content/using_cgroups.html
http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/NodeManagerCgroups.html
https://developer.ibm.com/hadoop/2017/06/30/deep-dive-yarn-cgroups/
https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/FairScheduler.html
This chapter describes how to use the YARN CLI (Command Line Interface) to view log files for running applications. You can access container log files using the YARN ResourceManager web UI, but more options are available when you use the yarn logs
CLI command.
Use the following command format to view all logs for a running application:
yarn logs -applicationId <Application ID>
Use the following command format to view all logs of a particular type for a running application:
yarn logs -applicationId <Application ID> -log_files <log_file_type>
For example, to view only the stderr
error logs:
yarn logs -applicationId <Application ID> -log_files stderr
The -logFiles
option also supports Java regular expressions, so the following format would return all types of log files:
yarn logs -applicationId <Application ID> -log_files .*
Use the following command format to view all ApplicationMaster container log files for a running application:
yarn logs -applicationId <Application ID> -am ALL
Use the following command format to view only the first ApplicationMaster containter log files:
yarn logs -applicationId <Application ID> -am 1
Use the following command format to list all container IDs for a running application:
yarn logs -applicationId <Application ID> -show_application_log_info
Once you have the container IDs, you can use the following command format to list the log files for a particular container:
yarn logs -applicationId <Application ID> -containerId <Container ID>
Use the following command format to list all of the container log file names (types) for a running application:
yarn logs -applicationId <Application ID> -show_container_log_info
You can then use the -logFiles
option to view a particular log type.
For large container log files, you can use the following command format to list only a portion of the log files for a particular container:
yarn logs -applicationId <Application ID> -containerId <Container ID> -size <bytes>
To view the first 1000 bytes:
yarn logs -applicationId <Application ID> -containerId <Container ID> -size 1000
To view the last 1000 bytes:
yarn logs -applicationId <Application ID> -containerId <Container ID> -size -1000
Use the following command format to download logs to a local folder:
yarn logs -applicationId <Application ID> -out <path_to_local_folder>
The container log files are organized in parent folders labeled with the applicable node ID.
To display Help for yarn logs
, run the following commmand:
yarn logs -help
Commands for testing¶
These operations are here primarily for testing.
kill-container <name> --id container-id
Kill a YARN container belong to the application. This is useful primarily for testing the resilience to failures.
Container IDs can be determined from the application instance status JSON document.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器