Hadoop YARN commands with Examples | Resource Manager | Developer | Admins




What is Hadoop YARN?

Basically, YARN is a part of the Hadoop 2 version for data processing.YARN stands for “Yet Another Resource Negotiator”.YARN is an efficient technology to manage the entire Hadoop cluster.

It is a completely new way of processing data and is in streaming, real-time, process data using different engines to manage the huge volume of data.

Basic & Advanced YARN Commands :

YARN version:

yarn version

YARN Node Commands:

yarn node -help
yarn node -list
yarn node -status
yarn node -states
sreekanth@sreekanth-Inspiron-5537:~$ yarn node -help
20/03/07 15:26:41 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
usage: node
-all Works with -list to list all nodes.
-help Displays help for all commands.
-list List all running nodes. Supports optional use of
-states to filter nodes based on node state, all -all
to list all nodes.
-states <States> Works with -list to filter nodes based on input
comma-separated list of node states.
-status <NodeId> Prints the status report of the node.

YARN Application Commands:

yarn application -help

yarn application appId <Applciaiton ID>

yarn application -appStates <States>

yarn application -appTags <Tags>

yarn application -appTypes <Types>

yarn application components <Components Name>

yarn application -decommission < Application Name>

yarn application - instances<Component Instances>

yarn application -list

yarn application -kill <application id>

yarn applicationattempt -help

yarn applicationattempt -list <ApplicationID>

yarn applicationattempt -status <Application Attempt ID>
sreekanth@sreekanth-Inspiron-5537:~$ yarn application -help
20/03/07 15:24:48 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
usage: application
-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,RUN
NING,FINISHED,FAILED,KILLED
-appTypes <Types> Works with -list to filter applications
based on input comma-separated list of
application types.
-help Displays help for all commands.
-kill <Application ID> Kills the application.
-list List applications. Supports optional use
of -appTypes to filter applications based
on application type, and -appStates to
filter applications based on application
state.
-movetoqueue <Application ID> Moves the application to a different
queue.
-queue <Queue Name> Works with the movetoqueue command to
specify which queue to move an
application to.
-status <Application ID> Prints the status of the application.

YARN Container Commands:




yarn container -help

yarn container -list <Application Attempt ID>

yarn contrainer -status <Container ID>

sreekanth@sreekanth-Inspiron-5537:~$ yarn container -help
20/03/07 15:31:23 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
usage: container
-help Displays help for all commands.
-list <Application Attempt ID> List containers for application attempt.
-status <Container ID> Prints the status of the container.
sreekanth@sreekanth-Inspiron-5537:~$

YARN Log Commands:

yarn application -help

yarn logs -applicationId <application ID>

yarn logs -appOwner <AppOwner>

yarn logs -applicationIdĀ  -containerID <Container ID>

yarn logs -applicaitonID -nodeAddress <Node Address>