${HADOOP_HOME}/bin/hadoop job
Usage: JobClient <command> <args>
[-submit <job-file>]
[-status <job-id>]
[-counter <job-id> <group-name> <counter-name>]
[-kill <job-id>]
[-abort <job-id>]
[-suspend <job-id> [hours]]
[-recover <job-id> [-force] [-jobconf name=value] [-file local-path] [-cacheArchive]]
[-set-priority <job-id> <priority>]. Valid values for priorities are: VERY_HIGH HIGH NORMAL LOW VERY_LOW
[-set-map-capacity <job-id> <map-capacity>]
[-set-reduce-capacity <job-id> <reduce-capacity>]
[-set-map-over-capacity <job-id> <true/false>]
[-set-reduce-over-capacity <job-id> <true/false>]
[-events <job-id> <from-event-#> <#-of-events>]
[-history <jobOutputDir>]
[-list [all]]
[-kill-task <task-id>]
[-fail-task <task-id>]
[-input-add <job-id> <input>]
[-input-done <job-id>]
  • -kill <job-id> kill一个job,job的最终状态是KILLED
  • -kill-task <task-id> kill一个task attempt,task attempt的最终状态是KILLED,对应的task会重新启动一个task attempt计算,kill不会导致task失败
  • -fail-task <task-id> fail一个task attempt,task attempt的最终状态是FAILED,如果task attempt fail超过一定次数(默认4次),对应task会失败
  • -set-priority <job-id> 设置job的优先级
  • -status <job-id> 获取job的状态
  • -list [all] 获取作业列表,没有参数表示获取运行的作业列表,参数all表示获取所有作业列表
  • -suspend <job-id> [hours], -recover <job-id> 在断点重启中介绍
05-22 22:51