[mapred yarn常用命令]

一般我们需要用命令的时候,却不知道命令是什么,那么这种情况下我们如何去查看自己需要的命令呢,接下来,我将带大家看一下如何查看命令帮助:

[hadoop@hadoop002 bin]$ mapred --help
Usage: mapred [--config confdir] COMMAND
       where COMMAND is one of:
  pipes                run a Pipes job
  job                  manipulate MapReduce jobs
  queue                get information regarding JobQueues
  classpath            prints the class path needed for running
                       mapreduce subcommands
  historyserver        run job history servers as a standalone daemon
  distcp <srcurl> <desturl> copy file or directories recursively
  archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
  archive-logs         combine aggregated logs into hadoop archives
  hsadmin              job history server admin interface

Most commands print help when invoked w/o parameters.




[hadoop@hadoop002 bin]$ mapred job 
Usage: CLI <command> <args>
        [-submit <job-file>]
        [-status <job-id>]
        [-counter <job-id> <group-name> <counter-name>]
        [-kill <job-id>]
        [-set-priority <job-id> <priority>]. Valid values for priorities are: VERY_HIGH HIGH NORMAL LOW VERY_LOW
        [-events <job-id> <from-event-#> <#-of-events>]
        [-history [all] <jobHistoryFile|jobId> [-outfile <file>] [-format <human|json>]]
        [-list [all]]
        [-list-active-trackers]
        [-list-blacklisted-trackers]
        [-list-attempt-ids <job-id> <task-type> <task-state>]. Valid values for <task-type> are MAP REDUCE. Valid values for <task-state> are running, completed
        [-kill-task <task-attempt-id>]
        [-fail-task <task-attempt-id>]
        [-logs <job-id> <task-attempt-id>]

Generic options supported are
-conf <configuration file>     specify an application configuration file
-D <property=value>            use value for given property
-fs <local|namenode:port>      specify a namenode
-jt <local|resourcemanager:port>    specify a ResourceManager
-files <comma separated list of files>    specify comma separated files to be copied to the map reduce cluster
-libjars <comma separated list of jars>    specify comma separated jar files to include in the classpath.
-archives <comma separated list of archives>    specify comma separated archives to be unarchived on the compute machines.

The general command line syntax is
bin/hadoop command [genericOptions] [commandOptions]





[hadoop@hadoop002 bin]$ mapred job -list 
19/02/23 21:39:34 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
19/02/23 21:39:35 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
Total jobs:1
                  JobId      State           StartTime      UserName           Queue      Priority       UsedContainers  RsvdContainers       UsedMem         RsvdMem         NeededMem         AM info
 job_1550323870337_1633       PREP       1550928758524        hadoop     root.hadoop        NORMAL                    0               0            0M              0M                0M      http://hadoop002:8088/proxy/application_1550323870337_1633/



[hadoop@hadoop002 bin]$ mapred job -kill job_1550323870337_1633
19/02/23 21:39:48 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
19/02/23 21:39:48 INFO client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8032
19/02/23 21:39:49 INFO impl.YarnClientImpl: Killed application application_1550323870337_1633
Killed job job_1550323870337_1633
[hadoop@hadoop002 bin]$ 
[hadoop@hadoop002 bin]$ 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值