- Mastering Hadoop 3
- Chanchal Singh Manish Kumar
- 238字
- 2025-04-04 14:54:50
Application commands
The application command is used to perform operations with applications submitted to the YARN cluster. The operation can include listing all the applications with a specific state, killing the application, debugging application logs, and so on. Let's look into a few commands and how to use them:
- -appStates: This command is used along with -list command to list all the application with a particular state. The following command will list all the applications that are in a killed state. The possible states are ALL, NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED:
YARN application -list -appStates killed
The output of the preceding command is as follows:

- -kill: The user may want to kill the running applications due to certain reasons such as visualized a bug in the execution process, application taking too long to execute, and so on. The -kill command will kill the submitted or running application, as follows:
YARN application -kill applicationId
- -status: The status of an application can be tracked using the -status command. It gives detailed information about an application like user, start time, end time, queue name, and so on, for example:
YARN application -status applicationID
The output of the preceding command is as follows:

- -movetoqueue: The application submitted to YARN by a queue can be moved to a different queue by the user using the -movetoqueue command, as follows:
YARN application -movetoqueue applicationID -queue queuename