hadoop Yarn distributedshell使用方法

hadoop Yarn distributedshell 相当于MapReduce的wordcount,可以见证Yarn的威力,各位也尝试一下吧

[root@HDP02 hadoop-yarn]# hadoop    org.apache.hadoop.yarn.applications.distributedshell.Client  -help
14/05/05 18:52:21 INFO distributedshell.Client: Initializing Client
usage: Client
 -appname <arg>                                 Application Name. Default
                                                value - DistributedShell
 -container_memory <arg>                        Amount of memory in MB to
                                                be requested to run the
                                                shell command
 -container_vcores <arg>                        Amount of virtual cores to
                                                be requested to run the
                                                shell command
 -debug                                         Dump out debug information
 -help                                          Print usage
 -jar <arg>                                     Jar file containing the
                                                application master
 -keep_containers_across_application_attempts   Flag to indicate whether
                                                to keep containers across
                                                application attempts. If
                                                the flag is true, running
                                                containers will not be
                                                killed when application
                                                attempt fails and these
                                                containers will be
                                                retrieved by the new
                                                application attempt
 -log_properties <arg>                          log4j.properties file
 -master_memory <arg>                           Amount of memory in MB to
                                                be requested to run the
                                                application master
 -master_vcores <arg>                           Amount of virtual cores to
                                                be requested to run the
                                                application master
 -num_containers <arg>                          No. of containers on which
                                                the shell command needs to
                                                be executed
 -priority <arg>                                Application Priority.
                                                Default 0
 -queue <arg>                                   RM Queue in which this
                                                application is to be
                                                submitted
 -shell_args <arg>                              Command line args for the
                                                shell script.Multiple args
                                                can be separated by empty
                                                space.
 -shell_cmd_priority <arg>                      Priority for the shell
                                                command containers
 -shell_command <arg>                           Shell command to be
                                                executed by the
                                                Application Master. Can
                                                only specify either
                                                --shell_command or
                                                --shell_script
 -shell_env <arg>                               Environment for shell
                                                script. Specified as
                                                env_key=env_val pairs
 -shell_script <arg>                            Location of the shell
                                                script to be executed. Can
                                                only specify either
                                                --shell_command or
                                                --shell_script
 -timeout <arg>                                 Application timeout in
                                                milliseconds

root@HDP02 hadoop-yarn]# hadoop org.apache.hadoop.yarn.applications.distributedshell.Client -jar hadoop-yarn-applications-distributedshell-2.4.0.2.1.1.0-385.jar -shell_script ./distributedshell.sh -num_containers 10000



14/05/05 18:54:15 INFO distributedshell.Client: Initializing Client
14/05/05 18:54:15 INFO distributedshell.Client: Running Client
14/05/05 18:54:16 INFO client.RMProxy: Connecting to ResourceManager at HDP02.unis.com/192.168.15.147:8050
14/05/05 18:54:17 INFO distributedshell.Client: Got Cluster metric info from ASM, numNodeManagers=3
14/05/05 18:54:17 INFO distributedshell.Client: Got Cluster node info from ASM
14/05/05 18:54:17 INFO distributedshell.Client: Got node report from ASM for, nodeId=HDP03.unis.com:45454, nodeAddressHDP03.unis.com:8042, nodeRackName/default-rack, nodeNumContainers4
14/05/05 18:54:17 INFO distributedshell.Client: Got node report from ASM for, nodeId=HDP04.unis.com:45454, nodeAddressHDP04.unis.com:8042, nodeRackName/default-rack, nodeNumContainers2
14/05/05 18:54:17 INFO distributedshell.Client: Got node report from ASM for, nodeId=HDP05.unis.com:45454, nodeAddressHDP05.unis.com:8042, nodeRackName/default-rack, nodeNumContainers2
14/05/05 18:54:17 INFO distributedshell.Client: Queue info, queueName=default, queueCurrentCapacity=0.6666667, queueMaxCapacity=1.0, queueApplicationCount=1, queueChildQueueCount=0
14/05/05 18:54:17 INFO distributedshell.Client: User ACL Info for Queue, queueName=root, userAcl=SUBMIT_APPLICATIONS
14/05/05 18:54:17 INFO distributedshell.Client: User ACL Info for Queue, queueName=root, userAcl=ADMINISTER_QUEUE
14/05/05 18:54:17 INFO distributedshell.Client: User ACL Info for Queue, queueName=default, userAcl=SUBMIT_APPLICATIONS
14/05/05 18:54:17 INFO distributedshell.Client: User ACL Info for Queue, queueName=default, userAcl=ADMINISTER_QUEUE
14/05/05 18:54:17 INFO distributedshell.Client: Max mem capabililty of resources in this cluster 3072
14/05/05 18:54:17 INFO distributedshell.Client: Max virtual cores capabililty of resources in this cluster 32
14/05/05 18:54:17 INFO distributedshell.Client: Copy App Master jar from local filesystem and add to local environment
14/05/05 18:54:19 INFO distributedshell.Client: Set the environment for the application master
14/05/05 18:54:19 INFO distributedshell.Client: Setting up app master command
14/05/05 18:54:19 INFO distributedshell.Client: Completed setting up app master command {{JAVA_HOME}}/bin/java -Xmx10m org.apache.hadoop.yarn.applications.distributedshell.ApplicationMaster --container_memory 10 --container_vcores 1 --num_containers 10000 --priority 0 1><LOG_DIR>/AppMaster.stdout 2><LOG_DIR>/AppMaster.stderr 
14/05/05 18:54:19 INFO distributedshell.Client: Submitting application to ASM
14/05/05 18:54:19 INFO impl.YarnClientImpl: Submitted application application_1399278642808_0013
14/05/05 18:54:20 INFO distributedshell.Client: Got application report from ASM for, appId=13, clientToAMToken=null, appDiagnostics=, appMasterHost=N/A, appQueue=default, appMasterRpcPort=-1, appStartTime=1399287259322, yarnAppState=ACCEPTED, distributedFinalState=UNDEFINED, appTrackingUrl=http://HDP02.unis.com:8088/proxy/application_1399278642808_0013/, appUser=root


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值