YARN常用命令
执行一个jar进行测试
[root@spark01 mapreduce]
yarn application 查看任务列表
[root@spark01 bin]
yarn application 查看任务状态
yarn application -list -appStates ALL/NEW/NEW_SAVING/SUBMITTED/ACCEPTED/RUNNING/FINISHED/FAILED/KILLED
yarn application 强杀任务
语法 : yarn application -kill applicationId
[root@spark01 bin]
yarn logs 查看日志
查询 Application 日志
[root@spark01 bin]
查询 Container 日志
语法 : yarn logs -applicationId application的id -containerId 容器的id
[root@spark01 bin]
yarn applicationattempt 查看尝试运行的任务
列出所有 Application 尝试的列表
语法 : yarn applicationattempt -list <ApplicationId>
[root@spark01 bin]
打印 ApplicationAttemp 状态
语法 : yarn applicationattempt -status <ApplicationAttemptId>
[root@spark01 bin]
yarn container 查看容器
列出所有 Container
语法 : yarn container -list <ApplicationAttemptId>
[root@spark01 bin]
打印 Container 状态
任务没启动是看不见状态的
语法 : yarn container -status <ContainerId>
[root@spark01 bin]
yarn node 查看节点状态
[root@spark01 bin]
yarn rmadmin 更新配置
每当更改yarn配置信息时可以使用以下语句进行更新
[root@spark01 bin]
yarn queue 查看队列
语法 : yarn queue -status <QueueName>
[root@spark01 bin]