Hadoop之MapReduce命令

概述

 

所有的Hadoop命令都通过bin/mapred脚本调用。在没有任何参数的情况下,运行mapred脚本将打印该命令描述。

使用:mapred [--config confdir] COMMAND

[hadoop@hadoopcluster78 bin]$ mapred
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
  hsadmin              job history server admin interface

Most commands print help when invoked w/o parameters.

用户命令

对于Hadoop集群用户很有用的命令:

 

archive

 

查看:Hadoop之命令指南

 

classpath

 

打印需要得到Hadoop的jar和所需要的lib包路径,hdfs,yarn脚本都有这个命令。

使用: mapred classpath

 

distcp

递归的拷贝文件或者目录,查看该篇中的示例:Hadoop之命令指南

 

job

通过job命令和MapReduce任务交互。

使用:mapred job | [GENERIC_OPTIONS] | [-submit <job-file>] | [-status <job-id>] | [-counter <job-id> <group-name> <counter-name>] | [-kill <job-id>] | [-events <job-id> <from-event-#> <#-of-events>] | [-history [all] <jobOutputDir>] | [-list [all]] | [-kill-task <task-id>] | [-fail-task <task-id>] | [-set-priority <job-id> <priority>]

 

参数选项 描述
-submit job-file 提交一个job.
-status job-id 打印map任务和reduce任务完成百分比和所有JOB的计数器。
-counter job-id group-name counter-n
  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值