Showing posts with label yarn node. Show all posts
Showing posts with label yarn node. Show all posts

Sunday, May 22, 2016

Yarn User commands



User commands
Yarn jar <jar file> Runs a jar file

Yarn classpath Prints the class path needed to get the Hadoop jar file and required libraries

Yarn version Prints the version of YARN

Yarn application –list  Lists applications via the ResourceManager

Yarn  application –list [-appTypes <Types>]. Types include YARN, Tez, MapReduce, etc.

Yarn application –list [-appStates <States>] <States> include  ALL,NEW, NEW_SAVING, SUBMITTED,
ACCEPTED, RUNNING, FINISHED, FAILED, and KILLED.

Yarn -status <ApplicationID> Prints application status

Yarn -kill <ApplicationID> Kill an application

Yarn node –list Lists cluster nodes
Yarn node –list [states <States>] to filter nodes based on node state, Valid <States> example:
RUNNING
Yarn node -list [-all]. To list all nodes.

Yarn node -status <NodeID> Prints a status report on the specified node

 yarn logs -applicationId <applicationID> command dumps log information.

Yarn logs  -applicationId <applicationID>  -appOwner: if an application owner ID is not provided, the current user ID will be used.

Yarn logs  -applicationId <applicationID>  -containerId: limits output to a specific container ID. Note – if this is specified, the node ID
must also be specified for the command to work properly.

Yarn logs -applicationId <applicationID>  -nodeAddress: specifies the node on which a specific container ID is running. If this is specified, the container ID must also be specified. The node address format should be nodename:port.

Yarn logs -applicationId <applicationID>
[-appOwner <AppOwner>]
[-containerId <ContainerID>]
[-nodeAddress <NodeAddress>]

Yarn Administrator commands

Yarn resourcemanager :start the resource manager

yarn nodemanager: starts (or restarts) the NodeManager daemon

yarn proxyserver: starts (or restarts) the Web proxy server

yarn daemonlog -getlevel <host:port> <name> Prints the log level of the named daemon
running at<host:port>

Yarn daemonlog -setlevel <host:port> <name> <level> Sets the log level of the named
daemon running at <host:port>
<level> options include DEBUG, INFO,NOTICE, WARN, etc.
yarn rmadmin -refreshQueues Reloads all queues ACLs,states and scheduler properties

yarn rmadmin -refreshNodes Refresh host information at the ResourceManager

yarn rmadmin -refreshUserToGroupsMappings Refresh user-to-groups mappings

yarn rmadmin -refreshSuperUserGroupsConfiguration Refresh superuser proxy group
mappings

yarn rmadmin -refreshAdminAcls Refresh administration ACLs

yarn rmadmin -refreshServiceAcl Refresh service-level authorization policy file

yarn rmadmin -getGroups [username] Return groups the specified user belongs to

yarn rmadmin -help [COMMAND] Displays help for the given command

yarn rmadmin -transitionToActive <serviceID> Transitions service into Active state

yarn rmadmin -transitionToStandby <serviceID> Transitions service into Standby state

yarn rmadmin -getServiceState <serviceID> Returns the state of the service

yarn rmadmin -checkHealth <serviceID> Requests a health check for the specified service

yarn rmadmin –refreshNodes

yarn rmadmin –refreshQueues command.

yarn rmadmin –getServiceState.

Yarn rmadmin –forcemanual –transitionToStandby rm1: manual failover