From ab5cd99177f8e92ef851104c2d25001ac29b0240 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Fri, 9 Jan 2015 15:01:29 -0800 Subject: [PATCH] YARN-3002. YARN documentation needs updating post-shell rewrite (aw) --- hadoop-yarn-project/CHANGES.txt | 2 + .../src/site/apt/TimelineServer.apt.vm | 2 +- .../src/site/apt/YarnCommands.apt.vm | 278 +++++++++++------- 3 files changed, 182 insertions(+), 100 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 514c282324..bcd3c5bcc7 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -32,6 +32,8 @@ Trunk - Unreleased 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 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/TimelineServer.apt.vm b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/TimelineServer.apt.vm index 6c8203ce74..7bb504e368 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/TimelineServer.apt.vm +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/TimelineServer.apt.vm @@ -215,7 +215,7 @@ YARN Timeline Server 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 diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm index cf41271af1..2de901bad0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm @@ -11,70 +11,49 @@ ~~ limitations under the License. See accompanying LICENSE file. --- - Yarn Commands + YARN Commands --- --- ${maven.build.timestamp} -Yarn Commands +YARN Commands %{toc|section=1|fromDepth=0} * 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. ------- -Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND ------- + Usage: <<>> - 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. *---------------+--------------+ || COMMAND_OPTIONS || Description | -*---------------+--------------+ -| --config confdir | Overwrites the default Configuration directory. Default -| | is $\{HADOOP_PREFIX\}/conf. -*---------------+--------------+ -| --loglevel loglevel | Overwrites the log level. Valid log levels are FATAL, -| | ERROR, WARN, INFO, DEBUG, and TRACE. Default is INFO. -*---------------+--------------+ +*-------------------------+-------------+ +| 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. +*-------------------------+----+ +| 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. +*------------------+---------------+ | COMMAND COMMAND_OPTIONS | Various commands with their options are described | | in the following sections. The commands have been | | grouped into {{User Commands}} and | | {{Administration Commands}}. -*---------------+--------------+ +*-------------------------+--------------+ * {User Commands} Commands useful for users of a Hadoop cluster. -** jar +** <<>> - Runs a jar file. Users can bundle their Yarn code in a jar file and execute - it using this command. - -------- - Usage: yarn jar [mainClass] args... -------- - -** application - - Prints application(s) report/kill application - -------- - Usage: yarn application -------- + Usage: <<>> *---------------+--------------+ || 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 | | comma-separated list of application states. The valid | | 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 | | 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. +*---------------+--------------+ +| -status ApplicationId | Prints the status of the application. *---------------+--------------+ -** node + Prints application(s) report/kill application - Prints node report(s) +** <<>> -------- - Usage: yarn node -------- + Usage: <<>> *---------------+--------------+ || COMMAND_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. +| -help | Help *---------------+--------------+ -| -states States | Works with -list to filter nodes based on input -| | comma-separated list of node states. +| -list ApplicationId | Lists applications attempts from the RM *---------------+--------------+ -| -all | Works with -list to list all nodes. -*---------------+--------------+ -| -status NodeId | Prints the status report of the node. +| -status Application Attempt Id | Prints the status of the application attempt. *---------------+--------------+ -** logs + prints applicationattempt(s) report - Dump the container logs +** <<>> -------- - Usage: yarn logs -applicationId -------- + Usage: <<>> + + Prints the class path needed to get the Hadoop jar and the required libraries + + +** <<>> + + Usage: <<>> + +*---------------+--------------+ +|| 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 + +** <<>> + + Usage: << [mainClass] args... >>> + + Runs a jar file. Users can bundle their YARN code in a jar file and execute + it using this command. + +** <<>> + + Usage: << [options] >>> *---------------+--------------+ || COMMAND_OPTIONS || Description | @@ -130,38 +135,99 @@ Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND | -containerId ContainerId | ContainerId (must be specified if node address is | | specified) *---------------+--------------+ +| -help | Help +*---------------+--------------+ | -nodeAddress NodeAddress | NodeAddress in the format nodename:port (must be | | 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 -------- - Usage: yarn classpath -------- +** <<>> -** version + Usage: <<>> - 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. +*---------------+--------------+ -------- - Usage: yarn version -------- + Prints node report(s) +** <<>> + + Usage: <<>> + +*---------------+--------------+ +|| COMMAND_OPTIONS || Description | +*---------------+--------------+ +| -help | Help +*---------------+--------------+ +| -status QueueName | Prints the status of the queue. +*---------------+--------------+ + + Prints queue information + + +** <<>> + + Usage: <<>> + + Prints the Hadoop version. * {Administration Commands} Commands useful for administrators of a Hadoop cluster. -** resourcemanager +** <<>> - Start the ResourceManager + Usage: -------- - Usage: yarn resourcemanager [-format-state-store] -------- +--------------------------------- + yarn daemonlog -getlevel + yarn daemonlog -setlevel +--------------------------------- + +*---------------+--------------+ +|| COMMAND_OPTIONS || Description | +*---------------+--------------+ +| -getlevel \ \ | Prints the log level of the daemon running +| | at \. This command internally connects to +| | http://\/logLevel?log=\ +*---------------+--------------+ +| -setlevel \ \ \ | Sets the log level of the daemon +| | running at \. This command internally connects to +| | http://\/logLevel?log=\ +*---------------+--------------+ + + Get/Set the log level for each daemon. + + +** <<>> + + Usage: <<>> + + Start the NodeManager + +** <<>> + + Usage: <<>> + + Start the web proxy server + +** <<>> + + Usage: <<>> *---------------+--------------+ || COMMAND_OPTIONS || Description | @@ -172,35 +238,22 @@ Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND | | ResourceManager is not running. *---------------+--------------+ -** nodemanager + Start the ResourceManager - Start the NodeManager -------- - Usage: yarn nodemanager -------- +** <<>> -** proxyserver + Usage: - Start the web proxy server - -------- - Usage: yarn proxyserver -------- - -** rmadmin - - Runs ResourceManager admin client - -------- - Usage: yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshUserToGroupsMapping] - [-refreshSuperUserGroupsConfiguration] [-refreshAdminAcls] +---- + yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshUserToGroupsMapping] + [-refreshSuperUserGroupsConfiguration] [-refreshAdminAcls] [-refreshServiceAcl] [-getGroups [username]] [-help [cmd]] [-transitionToActive ] [-transitionToStandby ] [-getServiceState ] [-checkHealth ] -------- +---- *---------------+--------------+ || COMMAND_OPTIONS || Description | @@ -240,25 +293,52 @@ Usage: yarn [--config confdir] [--loglevel loglevel] COMMAND | | non-zero exit code if the check fails. *---------------+--------------+ -** daemonlog + Runs ResourceManager admin client - Get/Set the log level for each daemon. +** scmadmin -------- - Usage: yarn daemonlog -getlevel - Usage: yarn daemonlog -setlevel -------- + Usage: <<>> *---------------+--------------+ || COMMAND_OPTIONS || Description | *---------------+--------------+ -| -getlevel \ \ | Prints the log level of the daemon running -| | at \. This command internally connects to -| | http://\/logLevel?log=\ +| -help | Help *---------------+--------------+ -| -setlevel \ \ \ | Sets the log level of the daemon -| | running at \. This command internally connects to -| | http://\/logLevel?log=\ +| -runCleanerTask | Runs the cleaner task *---------------+--------------+ + Runs Shared Cache Manager admin client + +** sharedcachemanager + + Usage: <<>> + + Start the Shared Cache Manager + +** timelineserver + + Usage: <<>> + + Start the TimeLineServer + + +* Files + +** <> + + This file stores the global settings used by all Hadoop shell commands. + +** <> + + This file stores overrides used by all YARN shell commands. + +** <> + + 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 <<>>, <<>>, and <<>> files + and can contain the same settings.