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.

Yarn的命令以bin/yarn的形式进行脚本调用不带任何参数运行yarn脚本会打印所有命令的描述。

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
指定节点地址

classpath

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

打印需要的hadoop jar和其他所需要库的jar所在路径

  Usage: yarn classpath

version

Prints the version.

打印版本

  Usage: yarn version

Administration Commands

Commands useful for administrators of a Hadoop cluster.

用于hadoop集群管理员命令

resourcemanager

Start the ResourceManager

启动资源管理器

  Usage: yarn resourcemanager

nodemanager

Start the NodeManager

启动节点管理器

  Usage: yarn nodemanager

proxyserver

Start the web proxy server

开启web代理服务

  Usage: yarn proxyserver

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

posted on 2014-03-21 11:36  AI001  阅读(195)  评论(0编辑  收藏  举报

导航