Monitoring Yarn Applications
In this step, we will learn how to monitor and manage Yarn applications using various commands.
List running Yarn applications:
yarn application -list
The exapmle output in the terminal:
UBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED] and tags: []):1
Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL
application_1711070937750_0001 word count MAPREDUCE hadoop default FINISHED SUCCEEDED 100% http://iZj6cdxwclh8pms0k1vyyhZ:19888/jobhistory/job/job_1711070937750_0001
Get application status
yarn application -status <application_id>
The example output in the terminal:
hadoop:~/ $ yarn application -status application_1711070937750_0001 [9:31:46]
2024-03-22 09:33:12,186 INFO client.DefaultNoHARMFailoverProxyProvider: Connecting to ResourceManager at /0.0.0.0:8032
2024-03-22 09:33:12,521 INFO conf.Configuration: resource-types.xml not found
2024-03-22 09:33:12,522 INFO resource.ResourceUtils: Unable to find 'resource-types.xml'.
Application Report :
Application-Id : application_1711070937750_0001
Application-Name : word count
Application-Type : MAPREDUCE
User : hadoop
Queue : default
Application Priority : 0
Start-Time : 1711071042168
Finish-Time : 1711071057334
Kill a running application
yarn application -kill <application_id>
The example output in the terminal:
hadoop:~/ $ yarn application -kill application_1711070937750_0001 [9:33:14]
2024-03-22 09:34:45,075 INFO client.DefaultNoHARMFailoverProxyProvider: Connecting to ResourceManager at /0.0.0.0:8032
Application application_1711070937750_0001 has already finished
tips: you can list all applications by yarn application -list -appStates ALL
The yarn application
command allows you to list, monitor, and manage Yarn applications. You can retrieve the application status, and even kill a running application using the respective subcommands.