yarn常用命令

浩客2年前技术文章1038

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

相关文章

Admission 准入控制器

准入控制器什么是准入控制器?就是 API 请求进来后,准许它进入或者丰富进来的 API 请求的控制器。如图所示,MutatingAdmissionWebhook 和 ValidatingAdmissi...

HAProxy

HAProxy

1、HAProxy简介  HAProxy 是一款基于 TCP(第四层)和 HTTP(第七层)应用的代理软件,它也可作为负载均衡器,而且完全免费。 借助 HAProxy,可以快速并且可靠地提供基于 TC...

lvm介绍和常用命令

lvm介绍和常用命令

在分区的时候,每个分区应该分多大是令人头疼的,而且随着长时间的运行,分区不管你分多大,都会被数据给占满。当遇到某个分区不够用时管理员可能甚至要备份整个系统、清除硬盘、重新对硬盘分区,然后恢复数据到新分...

开源大数据集群部署(十四)Ranger集成Hbase

开源大数据集群部署(十四)Ranger集成Hbase

在hd1.dtstack.com主机上执行在hmaster和back master上进行安装和执行Ø 解压ranger-2.3.0-hbase-plugin[root@hd1.dtstack.com ...

A集群导入B集群中的高可用版rancher

A集群导入B集群中的高可用版rancher

问题现象:已知在B集群中采用helm方式部署了一个高可用版本的rancher,该rancher中已经配置导入了三套集群,并且三套集群状态在rancher控制台处均显示正常,日常可借助该rancher管...

Flume使用案例之Flume与Flume之间数据传递,多Flume汇总数据到单Flume

目标:flume11监控文件hive.log,flume-22监控某一个端口的数据流,flume11与flume-22将数据发送给flume-33,flume33将最终数据写入到HDFS。分步实现:1...

发表评论    

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