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)
(3)Kill掉Application:yarn application -kill <Application-Id>
2. yarn logs 查看日志
(1)查询Application日志:yarn logs -applicationId <ApplicationId>
(2)查询Container日志:yarn logs -applicationId <ApplicationId> -containerId <ContainerId>
3. yarn applicationattempt查看尝试运行的任务
(1)列出所有Application尝试的列表:yarn applicationattempt -list <ApplicationId>
(2)打印ApplicationAttemp状态:yarn applicationattempt -status <ApplicationAttemptId>
4. yarn container 查看容器
只有在任务跑的途中才能看到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 <QueueName>