hadoop2.0.x【3】--Yarn Commands
Overview
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
Yarn has an option parsing framework that employs parsing generic options as well as running classes.
Yarn有一个选项解析框架用于解析一般的选项和运行类。
COMMAND_OPTIONS | Description |
---|---|
--config confdir | Overwrites the default Configuration directory. Default is $HADOOP_PREFIX/conf. 覆盖缺省配置目录。默认值是$ HADOOP_PREFIX/ conf。 |
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.
用于hadoop集群命令
jar
Runs a jar file. Users can bundle their Yarn code in a jar file and execute it using this command.
运行jar文件。用户可以打包他们yarn代码在一个jar文件,然后使用这个命令执行。
Usage: yarn jar <jar> [mainClass] args...
application
Prints application(s) report/kill application
打印应用程序的报告/杀掉应用程序
Usage: yarn application <options>
COMMAND_OPTIONS | Description |
---|---|
-status ApplicationId | Specify an application id 指定程序id |
-list | Lists all the Applications from RM 从RM列出所有程序的列表 |
-kill ApplicationId | Specify an application id 指定要杀程序的id |
node
Prints node report(s)
打印节点信息
Usage: yarn node <options>
COMMAND_OPTIONS | Description |
---|---|
-status NodeId | Specify a node id 指定节点id |
-list | Lists all the Nodes 列出节点列表 |
logs
Dump the container logs
转存容器日志
Usage: yarn logs <options>
COMMAND_OPTIONS | Description |
---|---|
-applicationId ApplicationId | Specify an application id 指定程序id |
-appOwner AppOwner | Specify an application owner 指定程序拥有者 |
-containerId ContainerId | Specify a container id 指定容器id |
-nodeAddress NodeAddress | Specify a node address 指定节点地址 |
Administration Commands
Commands useful for administrators of a Hadoop cluster.
用于hadoop集群管理员命令
rmadmin
Runs ResourceManager admin client
Usage: yarn rmadmin [-refreshQueues] [-refreshNodes] [-refreshUserToGroupsMapping] [-refreshSuperUserGroupsConfiguration] [-refreshAdminAcls] [-refreshServiceAcl] [-help [cmd]]
COMMAND_OPTIONS | Description |
---|---|
-refreshQueues | Reload the queues' acls, states and scheduler specific properties. ResourceManager will reload the mapred-queues configuration file. 重新载入队列的ACL,状态和调度程序特定的属性。ResourceManager将刷新mapred-队列的配置文件。 |
-refreshNodes | Refresh the hosts information at the ResourceManager. 刷新在ResourceManager中的主机信息。 |
-refreshUserToGroupsMappings | Refresh user-to-groups mappings. 刷新用户到组的映射。 |
-refreshSuperUserGroupsConfiguration | Refresh superuser proxy groups mappings. 刷新超级用户代理组的映射。 |
-refreshAdminAcls | Refresh acls for administration of ResourceManager 刷新的ACL的ResourceManager的管理 |
-refreshServiceAcl | Reload the service-level authorization policy file ResoureceManager will reload the authorization policy file. 刷新服务级授权策略文件ResoureceManager将重新加载授权策略文件。 |
-help [cmd] | Displays help for the given command or all commands if none is specified. 显示帮助对于给定的命令或所有命令,如果没有指定。 |
daemonlog
Get/Set the log level for each daemon.
设置/获取每一个守护集成的日志等级
设置日志的守护进程层次
Usage: yarn daemonlog -getlevel <host:port> <name> Usage: 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 打印在主机上运行的守护进程的日志级别:端口。该命令在内部连接到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 设置在主机上运行的守护进程的日志级别:端口。该命令在内部连接到http://host:port/logLevel?log=name |