YARN-3002. YARN documentation needs updating post-shell rewrite (aw)

This commit is contained in:
Allen Wittenauer 2015-01-09 15:01:29 -08:00
parent ae91b13a4b
commit ab5cd99177
3 changed files with 182 additions and 100 deletions

View File

@ -32,6 +32,8 @@ Trunk - Unreleased
YARN-2525. yarn logs command gives error on trunk (Akira AJISAKA via aw) YARN-2525. yarn logs command gives error on trunk (Akira AJISAKA via aw)
YARN-3002. YARN documentation needs updating post-shell rewrite (aw)
Release 2.7.0 - UNRELEASED Release 2.7.0 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -215,7 +215,7 @@ YARN Timeline Server
Or users can start the Timeline server / history service as a daemon: Or users can start the Timeline server / history service as a daemon:
+---+ +---+
$ yarn-daemon.sh start timelineserver $ yarn --daemon start timelineserver
+---+ +---+
* Accessing generic-data via command-line * Accessing generic-data via command-line

View File

@ -11,70 +11,49 @@
~~ limitations under the License. See accompanying LICENSE file. ~~ limitations under the License. See accompanying LICENSE file.
--- ---
Yarn Commands YARN Commands
--- ---
--- ---
${maven.build.timestamp} ${maven.build.timestamp}
Yarn Commands YARN Commands
%{toc|section=1|fromDepth=0} %{toc|section=1|fromDepth=0}
* Overview * Overview
Yarn commands are invoked by the bin/yarn script. Running the yarn script YARN commands are invoked by the bin/yarn script. Running the yarn script
without any arguments prints the description for all commands. without any arguments prints the description for all commands.
------ Usage: <<<yarn [SHELL_OPTIONS] COMMAND [GENERIC_OPTIONS] [COMMAND_OPTIONS]>>>
Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND
------
Yarn has an option parsing framework that employs parsing generic options as YARN has an option parsing framework that employs parsing generic options as
well as running classes. well as running classes.
*---------------+--------------+ *---------------+--------------+
|| COMMAND_OPTIONS || Description | || COMMAND_OPTIONS || Description |
*---------------+--------------+ *-------------------------+-------------+
| --config confdir | Overwrites the default Configuration directory. Default | SHELL_OPTIONS | The common set of shell options. These are documented on the {{{../../hadoop-project-dist/hadoop-common/CommandsManual.html#Shell Options}Commands Manual}} page.
| | is $\{HADOOP_PREFIX\}/conf. *-------------------------+----+
*---------------+--------------+ | GENERIC_OPTIONS | The common set of options supported by multiple commands. See the Hadoop {{{../../hadoop-project-dist/hadoop-common/CommandsManual.html#Generic Options}Commands Manual}} for more information.
| --loglevel loglevel | Overwrites the log level. Valid log levels are FATAL, *------------------+---------------+
| | ERROR, WARN, INFO, DEBUG, and TRACE. Default is INFO.
*---------------+--------------+
| COMMAND COMMAND_OPTIONS | Various commands with their options are described | COMMAND COMMAND_OPTIONS | Various commands with their options are described
| | in the following sections. The commands have been | | in the following sections. The commands have been
| | grouped into {{User Commands}} and | | grouped into {{User Commands}} and
| | {{Administration Commands}}. | | {{Administration Commands}}.
*---------------+--------------+ *-------------------------+--------------+
* {User Commands} * {User Commands}
Commands useful for users of a Hadoop cluster. Commands useful for users of a Hadoop cluster.
** jar ** <<<application>>>
Runs a jar file. Users can bundle their Yarn code in a jar file and execute Usage: <<<yarn application [options] >>>
it using this command.
-------
Usage: yarn jar <jar> [mainClass] args...
-------
** application
Prints application(s) report/kill application
-------
Usage: yarn application <options>
-------
*---------------+--------------+ *---------------+--------------+
|| COMMAND_OPTIONS || Description | || COMMAND_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 | -appStates States | Works with -list to filter applications based on input
| | comma-separated list of application states. The valid | | comma-separated list of application states. The valid
| | application state can be one of the following: \ | | application state can be one of the following: \
@ -84,40 +63,66 @@ Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND
| -appTypes Types | Works with -list to filter applications based on input | -appTypes Types | Works with -list to filter applications based on input
| | comma-separated list of application types. | | comma-separated list of application types.
*---------------+--------------+ *---------------+--------------+
| -status ApplicationId | Prints the status of the application. | -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.
*---------------+--------------+ *---------------+--------------+
| -kill ApplicationId | Kills the application. | -kill ApplicationId | Kills the application.
*---------------+--------------+
| -status ApplicationId | Prints the status of the application.
*---------------+--------------+ *---------------+--------------+
** node Prints application(s) report/kill application
Prints node report(s) ** <<<applicationattempt>>>
------- Usage: <<<yarn applicationattempt [options] >>>
Usage: yarn node <options>
-------
*---------------+--------------+ *---------------+--------------+
|| COMMAND_OPTIONS || Description | || COMMAND_OPTIONS || Description |
*---------------+--------------+ *---------------+--------------+
| -list | Lists all running nodes. Supports optional use of -states to filter | -help | Help
| | nodes based on node state, and -all to list all nodes.
*---------------+--------------+ *---------------+--------------+
| -states States | Works with -list to filter nodes based on input | -list ApplicationId | Lists applications attempts from the RM
| | comma-separated list of node states.
*---------------+--------------+ *---------------+--------------+
| -all | Works with -list to list all nodes. | -status Application Attempt Id | Prints the status of the application attempt.
*---------------+--------------+
| -status NodeId | Prints the status report of the node.
*---------------+--------------+ *---------------+--------------+
** logs prints applicationattempt(s) report
Dump the container logs ** <<<classpath>>>
------- Usage: <<<yarn classpath>>>
Usage: yarn logs -applicationId <application ID> <options>
------- Prints the class path needed to get the Hadoop jar and the required libraries
** <<<container>>>
Usage: <<<yarn container [options] >>>
*---------------+--------------+
|| COMMAND_OPTIONS || Description |
*---------------+--------------+
| -help | Help
*---------------+--------------+
| -list ApplicationId | Lists containers for the application attempt.
*---------------+--------------+
| -status ContainerId | Prints the status of the container.
*---------------+--------------+
prints container(s) report
** <<<jar>>>
Usage: <<<yarn jar <jar> [mainClass] args... >>>
Runs a jar file. Users can bundle their YARN code in a jar file and execute
it using this command.
** <<<logs>>>
Usage: <<<yarn logs -applicationId <application ID> [options] >>>
*---------------+--------------+ *---------------+--------------+
|| COMMAND_OPTIONS || Description | || COMMAND_OPTIONS || Description |
@ -130,38 +135,99 @@ Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND
| -containerId ContainerId | ContainerId (must be specified if node address is | -containerId ContainerId | ContainerId (must be specified if node address is
| | specified) | | specified)
*---------------+--------------+ *---------------+--------------+
| -help | Help
*---------------+--------------+
| -nodeAddress NodeAddress | NodeAddress in the format nodename:port (must be | -nodeAddress NodeAddress | NodeAddress in the format nodename:port (must be
| | specified if container id is specified) | | specified if container id is specified)
*---------------+--------------+ *---------------+--------------+
** classpath Dump the container logs
Prints the class path needed to get the Hadoop jar and the required libraries
------- ** <<<node>>>
Usage: yarn classpath
-------
** version Usage: <<<yarn node [options] >>>
Prints the version. *---------------+--------------+
|| COMMAND_OPTIONS || Description |
*---------------+--------------+
| -all | Works with -list to list all nodes.
*---------------+--------------+
| -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.
*---------------+--------------+
| -status NodeId | Prints the status report of the node.
*---------------+--------------+
------- Prints node report(s)
Usage: yarn version
-------
** <<<queue>>>
Usage: <<<yarn queue [options] >>>
*---------------+--------------+
|| COMMAND_OPTIONS || Description |
*---------------+--------------+
| -help | Help
*---------------+--------------+
| -status QueueName | Prints the status of the queue.
*---------------+--------------+
Prints queue information
** <<<version>>>
Usage: <<<yarn version>>>
Prints the Hadoop version.
* {Administration Commands} * {Administration Commands}
Commands useful for administrators of a Hadoop cluster. Commands useful for administrators of a Hadoop cluster.
** resourcemanager ** <<<daemonlog>>>
Start the ResourceManager Usage:
------- ---------------------------------
Usage: yarn resourcemanager [-format-state-store] yarn daemonlog -getlevel <host:port> <name>
------- yarn daemonlog -setlevel <host:port> <name> <level>
---------------------------------
*---------------+--------------+
|| COMMAND_OPTIONS || Description |
*---------------+--------------+
| -getlevel \<host:port\> \<name\> | Prints the log level of the daemon running
| | at \<host:port\>. This command internally connects to
| | http://\<host:port\>/logLevel?log=\<name\>
*---------------+--------------+
| -setlevel \<host:port\> \<name\> \<level\> | Sets the log level of the daemon
| | running at \<host:port\>. This command internally connects to
| | http://\<host:port\>/logLevel?log=\<name\>
*---------------+--------------+
Get/Set the log level for each daemon.
** <<<nodemanager>>>
Usage: <<<yarn nodemanager>>>
Start the NodeManager
** <<<proxyserver>>>
Usage: <<<yarn proxyserver>>>
Start the web proxy server
** <<<resourcemanager>>>
Usage: <<<yarn resourcemanager [-format-state-store]>>>
*---------------+--------------+ *---------------+--------------+
|| COMMAND_OPTIONS || Description | || COMMAND_OPTIONS || Description |
@ -172,35 +238,22 @@ Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND
| | ResourceManager is not running. | | ResourceManager is not running.
*---------------+--------------+ *---------------+--------------+
** nodemanager Start the ResourceManager
Start the NodeManager
------- ** <<<rmadmin>>>
Usage: yarn nodemanager
-------
** proxyserver Usage:
Start the web proxy server ----
yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshUserToGroupsMapping]
------- [-refreshSuperUserGroupsConfiguration] [-refreshAdminAcls]
Usage: yarn proxyserver
-------
** rmadmin
Runs ResourceManager admin client
-------
Usage: yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshUserToGroupsMapping]
[-refreshSuperUserGroupsConfiguration] [-refreshAdminAcls]
[-refreshServiceAcl] [-getGroups [username]] [-help [cmd]] [-refreshServiceAcl] [-getGroups [username]] [-help [cmd]]
[-transitionToActive <serviceId>] [-transitionToActive <serviceId>]
[-transitionToStandby <serviceId>] [-transitionToStandby <serviceId>]
[-getServiceState <serviceId>] [-getServiceState <serviceId>]
[-checkHealth <serviceId>] [-checkHealth <serviceId>]
------- ----
*---------------+--------------+ *---------------+--------------+
|| COMMAND_OPTIONS || Description | || COMMAND_OPTIONS || Description |
@ -240,25 +293,52 @@ Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND
| | non-zero exit code if the check fails. | | non-zero exit code if the check fails.
*---------------+--------------+ *---------------+--------------+
** daemonlog Runs ResourceManager admin client
Get/Set the log level for each daemon. ** scmadmin
------- Usage: <<<yarn scmadmin [options] >>>
Usage: yarn daemonlog -getlevel <host:port> <name>
Usage: yarn daemonlog -setlevel <host:port> <name> <level>
-------
*---------------+--------------+ *---------------+--------------+
|| COMMAND_OPTIONS || Description | || COMMAND_OPTIONS || Description |
*---------------+--------------+ *---------------+--------------+
| -getlevel \<host:port\> \<name\> | Prints the log level of the daemon running | -help | Help
| | at \<host:port\>. This command internally connects to
| | http://\<host:port\>/logLevel?log=\<name\>
*---------------+--------------+ *---------------+--------------+
| -setlevel \<host:port\> \<name\> \<level\> | Sets the log level of the daemon | -runCleanerTask | Runs the cleaner task
| | running at \<host:port\>. This command internally connects to
| | http://\<host:port\>/logLevel?log=\<name\>
*---------------+--------------+ *---------------+--------------+
Runs Shared Cache Manager admin client
** sharedcachemanager
Usage: <<<yarn sharedcachemanager>>>
Start the Shared Cache Manager
** timelineserver
Usage: <<<yarn timelineserver>>>
Start the TimeLineServer
* Files
** <<etc/hadoop/hadoop-env.sh>>
This file stores the global settings used by all Hadoop shell commands.
** <<etc/hadoop/yarn-env.sh>>
This file stores overrides used by all YARN shell commands.
** <<etc/hadoop/hadoop-user-functions.sh>>
This file allows for advanced users to override some shell functionality.
** <<~/.hadooprc>>
This stores the personal environment for an individual user. It is
processed after the <<<hadoop-env.sh>>>, <<<hadoop-user-functions.sh>>>, and <<<yarn-env.sh>>> files
and can contain the same settings.