李林超博客
首页
归档
留言
友链
动态
关于
归档
留言
友链
动态
关于
首页
大数据
正文
05.Yarn常用命令
Leefs
2021-09-09 PM
1279℃
0条
# 05.Yarn常用命令 ### 前言 一般我们查看Yarn状态的时候,直接通过访问网页方式进行查看:`http://IP:8088/`,默认端口号为8088。本篇主要讲解另一种方式,通过命令行查看Yarn状态。 #### 1. yarn application查看任务 ##### 1.1 列出所有Application **命令** ``` [root@hadoop103 ~]# yarn application -list ``` ##### 1.2 根据Application状态过滤 **命令** > yarn application -list -appStates 【状态名称】 **示例** ``` #查询状态为执行完成的所有队列信息 [root@hadoop103 ~]# yarn application -list -appStates FINISHED ``` **所有状态:** + ALL + NEW + NEW_SAVING + SUBMITTED + ACCEPTED + RUNNING + FINISHED + FAILED + KILLED ##### 1.3 Kill掉Application **命令** > yarn application -kill 【applicaionID号】 **示例** ``` [root@hadoop103 ~]# yarn application -kill application_1628738138534_3067 ``` 对于执行异常的任务我们可以通过kill命令来释放资源。 #### 2. yarn logs查看日志 ##### 2.1 查询Application日志 **命令** > yarn logs -applicationId 【ApplicationID】 **示例** ``` [root@hadoop103 ~]# yarn logs -applicationId application_1628738138534_3067 ``` ##### 2.2 查询Container日志 **命令** > yarn logs -applicationId 【ApplicationID】-containerId 【containerID】 **示例** ``` [root@hadoop103 ~]# yarn logs -applicationId application_1628738138534_3067 -containerId container_1628738138534_3067_01_000001 ``` #### 3. yarn applicationattempt 查看尝试运行的任务 ##### 3.1 列出所有Application尝试的列表 **命令** > yarn applicationattempt -list 【ApplicationID】 **示例** ``` [root@hadoop103 ~]# yarn applicationattempt -list application_1628738138534_3067 ``` ##### 3.2 打印 ApplicationAttemp 状态 **命令** > yarn applicationattempt -status 【Attempt ID】 **示例** ``` [root@hadoop103 ~]# yarn applicationattempt -status appattempt_1628738138534_3067_000001 ``` #### 4. yarn container查看容器 ##### 4.1 列出所有Container **命令** > yarn container -list 【Attempt ID】 **示例** ``` [root@hadoop103 ~]# yarn container -list appattempt_1628738138534_3067_000001 ``` ##### 4.2 打印 Container 状态 **命令** > yarn container -status 【Container ID】 **示例** ``` [root@hadoop103 ~]# yarn container -status container_1628738138534_3067_01_000001 ``` #### 5. yarn node查看节点状态 ##### 5.1 列出所有节点 **命令** ``` [root@hadoop103 ~]# yarn node -list -all ``` #### 6. yarn rmadmin更新配置 ##### 6.1 加载队列配置 **命令** ``` [root@hadoop103 ~]# yarn rmadmin -refreshQueues ``` #### 7. yarn queue查看队列 ##### 7.1 打印队列信息 **命令** > yarn queue -status 【QueueName】 **示例** ``` [root@hadoop103 ~]# yarn queue -status default ```
标签:
Hadoop
,
Yarn
非特殊说明,本博所有文章均为博主原创。
如若转载,请注明出处:
https://lilinchao.com/archives/1427.html
上一篇
04.Yarn调度算法
下一篇
06.Yarn核心参数配置
取消回复
评论啦~
提交评论
栏目分类
随笔
2
Java
326
大数据
229
工具
31
其它
25
GO
43
标签云
Git
Spark Streaming
ajax
锁
序列化和反序列化
MySQL
哈希表
人工智能
Netty
GET和POST
Tomcat
Livy
Http
并发编程
MyBatis-Plus
Python
Yarn
MyBatis
FastDFS
栈
线程池
LeetCode刷题
HDFS
FileBeat
nginx
JVM
Spark SQL
随笔
递归
数据结构
友情链接
申请
范明明
庄严博客
Mx
陶小桃Blog
虫洞