yarn常用命令

浩客2年前技术文章1052

1、yarn application 查看任务

1.1 列出所有 Application:

yarn application -list

1.2 根据 Application 状态过滤:yarn application -list -appStates (所有状态:ALL、NEW、

NEW_SAVINGSUBMITTEDACCEPTEDRUNNINGFINISHEDFAILEDKILLED

yarn application -list -appStates

1.3 Kill 掉 Application:

yarn application -kill <ApplicationId>


2、yarn logs 查看日志

2.1 查询 Application 日志:yarn logs -applicationId <ApplicationId>

yarn logs -applicationId application_1612577921195_0001

2.2 查询 Container 日志:yarn logs -applicationId <ApplicationId> -containerId <ContainerId>

yarn logs -applicationId application_1612577921195_0001 -containerIdcontainer_1612577921195_0001_01_000001


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

3.1 列出所有 Application 尝试的列表:yarn applicationattempt -list <ApplicationId>

yarn applicationattempt -list application_1612577921195_0001

3.2 打印 ApplicationAttemp 状态:yarn applicationattempt -status <ApplicationAttemptId>

yarn applicationattempt -status appattempt_1612577921195_0001_000001


4、yarn container 查看容器

4.1 列出所有 Container:yarn container -list <ApplicationAttemptId>

yarn container -list appattempt_1612577921195_0001_000001

4.2 打印 Container 状态:yarn container -status <ContainerId>

yarn container -status container_1612577921195_0001_01_000001

注:只有在任务跑的途中才能看到 container 的状态


5、yarn node 查看节点状态

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

yarn node -list -all


6、yarn rmadmin 更新配置

6.1 加载队列配置:yarn rmadmin -refreshQueues

在修改queue相关配置参数后,可以使用此命令,不需要重启yarn。

yarn rmadmin -refreshQueues


7、yarn queue 查看队列

7.1 打印队列信息:yarn queue -status <QueueName>

yarn queue -status default

相关文章

HDFS Fsimage分析磁盘目录(文件级别)

HDFS Fsimage分析磁盘目录(文件级别)

首先获取fsimage信息hdfs dfsadmin -fetchImage  /opt/fsimage格式化fsimage 转换为可读文本hdfs oiv -i /opt/fsimage/fsima...

CPU--使用率

CPU--使用率

一、CPU和任务统计信息查询/proc/stat第一行表示所有CPU的累加其他列表示不同场景下CPU的累加节拍数,单位:USER_HZ即10ms➜  ~ cat ...

Hive优化之Spark执行引擎的参数优化(二)

Hive优化之Spark执行引擎的参数优化(二)

        Hive是大数据领域常用的组件之一,主要是大数据离线数仓的运算,关于Hive的性能调优在日常工作和面试中...

MySQL 有意思的权限报错

前言今天遇到了一个报错,觉得挺有意思的,在此记录下。SELECT command denied to user 'xxx'@'xxx' for table 'xxx'1. 报错原因这里是研发提了一条修...

Linux 文件锁

1、背景Linux 系统定时任务正在执行时,可能会遇到上个周期的任务还没有执行完,这样便会造成相同的任务同一时间有过个任务进程在执行。如果任务有对互斥资源操作时,有可能产生死锁。2、用法参考flock...

Redis 主从同步

Redis 主从同步

前言在分布式系统中为了解决单点问题,通常会把数据复制到多个副本部署到其它机器,满足故障恢复和负载均衡需求。Redis 也提供了复制功能,实现相同数据多个 Redis 副本。本篇文章介绍如何配置 Red...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。