yarn常用命令

浩客1年前技术文章718

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

相关文章

Kafka 单条日志传输大小

kafka 对于消息体的大小默认为单条最大值是1M 但是在我们应用场景中, 常常会出现一条消息大于1M,如果不对kafka 进行配置。则会出现生产者无法将消息推送到kafka 或消费者无法去消费kaf...

Ldap高可用部署

Ldap配置高可用两个节点上均执行mkdir /data/ldapcd /data/ldap1.1. 添加mod_syncprov.ldif文件vi mod_syncprov.ldif 内容如下:ob...

NAS文件被删除问题排查

NAS文件被删除问题排查

一、问题现象客户业务方反馈服务器上挂载的nas文件被删除,业务中许多文件丢失,业务受到严重影响。需要我方协助排查。二、问题背景该nas挂载到两台业务服务器上,后端应用为java应用,存储内容为jpg、...

通过SDK上传oss文件报错“413 Request Entity Too Large”

通过SDK上传oss文件报错“413 Request Entity Too Large”

问题描述通过SDK上传oss文件返回错误如下,客户反馈上传的文件不大,只有200M。浏览器端访问返回504 timeout报错,同客户核实是每次到1min 30s时候上传大文件会报错com.aliyu...

CentOS6.x下的ntp服务

CentOS6.x下的ntp服务配置192.168.1.1(node01) 负责与外网同步时间,同时作为内网的ntp服务192.168.1.2(node02) 和内网192.168.1.1去同步时间,...

trino组件对接alluxio(三)

trino组件对接alluxio(三)

本文是基于已经部署了trino和alluxio的基础上,进行的trino与alluxio的组件对接,alluxio已经开启了高可用模式。安装部署1、增加alluxio配置在core-site.xml和...

发表评论    

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