YARN Resource Management

Posted wcfgroup

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了YARN Resource Management相关的知识,希望对你有一定的参考价值。

 

?Chapter 11. Using the YARN CLI to View Logs for Running Applications

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.

?View all Log Files for a Running Application

Use the following command format to view all logs for a running application:

yarn logs -applicationId <Application ID>

?View a Specific Log Type for a Running Application

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 .* 

?View ApplicationMaster 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

?List Container IDs

Use the following command format to list all container IDs for a running application:

yarn logs -applicationId <Application ID> -show_application_log_info

?View Log Files for One Container

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>

?Show Container Log File Information

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.

?View a Portion of the Log Files for One Container

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

?Download Logs for a Running Application

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.

?Display Help for YARN Logs

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.

以上是关于YARN Resource Management的主要内容,如果未能解决你的问题,请参考以下文章

SQL 语句代编代写DATA MANAGEMENT SYSTEMS代写代做

大数据技术|Hadoop 3.0: YARN Resource自定义资源配置说明

Quasar:Resource-Efficient and Qos-Aware Cluster Management

Quasar:Resource-Efficient and Qos-Aware Cluster Management

yarn 与 resource manager ha

转Resource Localization in YARN