yarn常用命令

浩客2年前技术文章1148

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

相关文章

kaniko构建镜像的方式

docker构建镜像用docker来构建容器镜像也是常用的方法,在具备构建容器镜像所需的两个要素(Dockerfile & 上下文)的前提下,用下述命令就能构建一个容器镜像出来```Plain...

MySQL keepalived配置(一)

一、MySQL数据初始化1.1、创建ha元数据结构:create database myha;  use myha;CREATE TABLE `ha_conf` ( `id` int(11) NOT...

Apache Ranger不使用root密码进行初始化

1、背景由于使用的数据库由dba进行管理,我们无法获取到对应的ranger数据库的root密码。需要使用数据库普通用户对表进行初始化2、解决ranger admin每次修改配置(install.pro...

RBAC

RBAC

API 对象在学习 RBAC 之前,我们还需要再去理解下 Kubernetes 集群中的对象,我们知道,在 Kubernetes 集群中,Kubernetes 对象是我们持久化的实体,就是最终存入 e...

HDP实操--NameNode开启高可用

HDP实操--NameNode开启高可用

为了确定在namenode组件失败后集群中有其他的namenode可以工作,需要对hdp集群配置高可用,当前我们配置的非安全集群的高可用。前置条件:(1)确保你的集群至少有3个节点并且至少有3个Apa...

linux下增加虚拟内存

用df -m查看系统分区状况,确定将虚拟内存放到那个盘里(找有足够空间的盘)[root@AY130716153752714ddeZ ~]# df -m Filesyst...

发表评论    

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