Yarn commands are invoked by the bin/yarn script. Running the yarn script without any arguments prints the description for all commands.
Usage: yarn [--config confdir] COMMAND
jar
Runs a jar file. Users can bundle their Yarn code in a jar file and execute it using this command.
Usage: yarn jar <jar> [mainClass] args...
application
Prints application(s) report/kill application
Usage: yarn application <options>
<options> | Description |
-list | Lists applications from the RM. Supports optional use of -appTypes to filter applications based on application type, and -appStates to filter applications based on application state. |
-appStates States | Works with -list to filter applications based on input comma-separated list of application states. The valid application state can be one of the following:
ALL, NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED |
-appTypes Types | Works with -list to filter applications based on input comma-separated list of application types. |
-status <ApplicationId> | Prints the status of the application based on <ApplicationId> |
-kill <ApplicationId> | Kills the application <ApplicationId> |
node
Prints node report(s)
Usage: yarn node <options>
<options> |
Description |
-list |
Lists all running nodes. Supports optional use of -states to filter nodes based on node state, and -all to list all nodes. |
-states States |
Works with -list to filter nodes based on input comma-separated list of node states. |
-all |
Works with -list to list all nodes. |
-status NodeId |
Prints the status report of the node. |
logs
Dump the container logs
Usage: yarn logs -applicationId <application ID> <options>
<options> |
Description |
-applicationId <application ID> |
Specifies an application id |
-appOwner AppOwner |
AppOwner (assumed to be current user if not specified) |
-containerId ContainerId |
ContainerId (must be specified if node address is specified) |
-nodeAddress NodeAddress |
NodeAddress in the format nodename:port (must be specified if container id is specified) |
classpath
Prints the class path needed to get the Hadoop jar and the required libraries
version
Prints the version.