yarn常用命令

浩客2年前技术文章1133

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

相关文章

Hive调优

1.Fetch抓取Fetch抓取是指,Hive中对某些情况的查询可以不必使用MapReduce计算。例如:SELECT * FROM students;在这种情况下,Hive可以简单地读取studen...

chengying-6.0登入接口逆向

chengying-6.0登入接口逆向

版本更新首先是登入的加密url:http://172.16.121.70/login参数1. username:admin@dtstack.com2. password:614bb9438210c69...

impala故障处理

问题复现:[cdh004:21000] > select count(*) from impala_100yi; Query: select count(*) from impala_100y...

k8s Krew 插件开发详解

前言:前面我们已经了解过krew插件的作用以及一些比较常用的插件,接下来我们讲一下如何开发krew插件。1、熟悉kubens 插件在开发krew插件之前,我们先通过kubens插件来熟悉krew,我们...

Elasticsearch如何使用内存

ES作为一个JAVA程序,其对内存的使用和管理依赖底层JVM。因而设置内存时需要遵从JAVA的普适原则,如-xmx和-xms设置为相同值等。在JVM的基础上,ES对内存的使用可按功能分为以下几大部分:...

Elasticsearch8.5及Kibana8.5安装部署

Elasticsearch8.5及Kibana8.5安装部署

一、环境准备1、Centos7系统2、切换英文系统[root@master02 ~]# tail -n2 /etc/profile export LANG="en_US.UTF-8"3、下载、安...

发表评论    

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