yarn的常用命令

一、 yarn常用命令:

1.yarn application 查看任务

(1)列出所有Application

yarn application -list
(2)根据 Application 状态过滤:yarn application -list -appStates (所有状态:ALL、NEW、NEW_SAVING、SUBMITTED、ACCEPTED、RUNNING、FINISHED、FAILED、KILLED)

2.yarn logs 查看日志

(1)查看Application 日志

yarn logs -applicationId

(2)查询Container 日志
yarn logs -applicationId -containerId

3.yarn applicationattempt 查看尝试运行的任务

(1)列出所有 Application 尝试的列表
yarn applicationattempt -list
(2)打印 ApplicationAttemp 状态
yarn applicationattempt -status

4. yarn container查看容器

(1)列出所有 Container yarn container -list ApplicationAttemptId>
(2)打印 Container 状态
yarn container -status ContainerId>

5.yarn node 查看节点状态

列出所有节点
yarn node -list -all

6.yarn rmadmin 跟新配置

yarn rmadmin -refreshQueues

7.yarn queue 查看队列

打印队列信息
yarn queue -status

二、常用命令汇总

1. yarn 命令行查看资源状态:

yarn top

2.查看指定queue使用情况:

yarn queue -status root.user.xxxx
示例: yarn queue -status root.j042x0

3.查看app状态:

yarn application -list -appStates 、 yarn application -list -appTypes

4.移动app到对应的队列:

示例:yarn application -movetoqueue application_1528080031923_0067 -queue root.j042x0

5.kill掉某个app任务:

  yarn application -kill      applicationId  
 例如:要杀掉这个任务:yarn application -kill  application_1528080031923_0067

6.查看Application 日志:

  yarn logs -applicationId
    示例:yarn logs -applicationId  application_1528080031923_0064

7.查看app状态命令:

yarn applicationattempt -list applicationId

8.打印类路径:

yarn classpath --glob

9. 打印正在执行任务的容器信息:

yarn container -list appattemptId
示例:yarn container -list appattempt_1528080031923_0068_000001

10.打印当前容器信息:

yarn container -status containerId

11. 提交任务到yarn:

yarn jar [mainClass] args…

12. 查看yarn集群所有节点信息:

yarn node -all -list

13. yarn application -list 根据 Application 状态过滤:

yarn application -list -appStates (所有状态:ALL、NEW、NEW_SAVING、SUBMITTED、ACCEPTED、RUNNING、FINISHED、FAILED、KILLED)
示例:yarn application -list -appStates RUNNING 查看正在运行的应用的状态信息

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值