Hadoop-yarn命令

一. yarn命令

[ruoze@rzdata001 ~]$ which yarn
~/app/hadoop/bin/yarn
[ruoze@rzdata001 ~]$ 
  • yarn -help yarn查看帮助
[ruoze@rzdata001 ~]$ yarn -help
Usage: yarn [--config confdir] COMMAND
where COMMAND is one of:
  resourcemanager -format-state-store   deletes the RMStateStore
  resourcemanager                       run the ResourceManager
                                        Use -format-state-store for deleting the RMStateStore.
                                        Use -remove-application-from-state-store <appId> for 
                                            removing application from RMStateStore.
  nodemanager                           run a nodemanager on each slave
  timelineserver                        run the timeline server
  rmadmin                               admin tools
  version                               print the version
  jar <jar>                             run a jar file
  application                           prints application(s)
                                        report/kill application
  applicationattempt                    prints applicationattempt(s)
                                        report
  container                             prints container(s) report
  node                                  prints node report(s)
  queue                                 prints queue information
  logs                                  dump container logs
  classpath                             prints the class path needed to
                                        get the Hadoop jar and the
                                        required libraries
  daemonlog                             get/set the log level for each
                                        daemon
  top                                   run cluster usage tool
 or
  CLASSNAME                             run the class named CLASSNAME

Most commands print help when invoked w/o parameters.
[ruoze@rzdata001 ~]$ 

常用如下:

  • yarn application 查看运行状态的任务,kill任务
yarn application -appStates ACCEPTED -list | awk -F "[@\t]" '{print $1,$4,$5,$6,$8,$2}'  |grep username
yarn application -appStates RUNNING -list | awk -F "[@\t]" '{print $1,$4,$5,$6,$8,$2}'  |grep username| grep  1545793104252_12911737
yarn application -kill application_1545793104252_123456789
  • yarn logs 提取相关日志
yarn logs -applicationId application_1566295658573_11041748 > ./job.log
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值