命令查看yarn当前任务列表

1、说明

可以在linux任意目录下输入命令;

2、查看yarn的所有命令的使用方法

root@master /]# yarn application
20/06/24 14:44:08 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.xxx.xx:8032
Invalid Command Usage : 
usage: application
 -appStates <States>             Works with -list to filter applications
                                 based on input comma-separated list of
                                 application states. The valid application
                                 state can be one of the following:
                                 ALL,NEW,NEW_SAVING,SUBMITTED,ACCEPTED,RUN
                                 NING,FINISHED,FAILED,KILLED
 -appTypes <Types>               Works with -list to filter applications
                                 based on input comma-separated list of
                                 application types.
 -help                           Displays help for all commands.
 -kill <Application ID>          Kills the application.
 -list                           List applications. Supports optional use
                                 of -appTypes to filter applications based
                                 on application type, and -appStates to
                                 filter applications based on application
                                 state.
 -movetoqueue <Application ID>   Moves the application to a different
                                 queue.
 -queue <Queue Name>             Works with the movetoqueue command to
                                 specify which queue to move an
                                 application to.
 -status <Application ID>        Prints the status of the application.

3、查看yarn正在运行的任务列表

[root@master /]# yarn application -list
20/06/24 14:25:11 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.xxx.xx:8032
Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED, RUNNING]):1
                Application-Id	    Application-Name	    Application-Type	      User	     Queue	             State           Final-State	       Progress	                       Tracking-URL
application_1592962175770_0004	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	           RUNNING	         UNDEFINED	            10%	         http://192.168.xxx.xx:4040

4、kill掉yarn正在运行的任务

[root@master /]# yarn application -kill application_1592962175770_0004
20/06/24 14:25:29 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.xxx.xx:8032
Killing application application_1592962175770_0004
20/06/24 14:25:30 INFO impl.YarnClientImpl: Killed application application_1592962175770_0004

5、查找yarn已经完成的任务列表

[root@master /]# yarn application -appStates finished -list
20/06/24 14:28:07 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.xxx.xx:8032
Total number of applications (application-types: [] and states: [FINISHED]):3
                Application-Id	    Application-Name	    Application-Type	      User	     Queue	             State           Final-State	       Progress	                       Tracking-URL
application_1592962175770_0001	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	          FINISHED	         SUCCEEDED	           100%	                                N/A
application_1592962175770_0002	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	          FINISHED	         SUCCEEDED	           100%	                                N/A
application_1592962175770_0003	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	          FINISHED	         SUCCEEDED	           100%	             

6、查找yarn所有任务列表

[root@master /]# yarn application -appStates ALL -list
20/06/24 14:27:37 INFO client.RMProxy: Connecting to ResourceManager at master/192.168.xxx.xx:8032
Total number of applications (application-types: [] and states: [NEW, NEW_SAVING, SUBMITTED, ACCEPTED, RUNNING, FINISHED, FAILED, KILLED]):4
                Application-Id	    Application-Name	    Application-Type	      User	     Queue	             State           Final-State	       Progress	                       Tracking-URL
application_1592962175770_0001	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	          FINISHED	         SUCCEEDED	           100%	                                N/A
application_1592962175770_0002	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	          FINISHED	         SUCCEEDED	           100%	                                N/A
application_1592962175770_0003	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	          FINISHED	         SUCCEEDED	           100%	                                N/A
application_1592962175770_0004	kafka2sparkStreaming2Hbase	               SPARK	      root	   default	            KILLED	            KILLED	           100%	http://master:8088/cluster/app/application_1592962175770_0004

欢迎加入【大数据技术】社区

  • 3
    点赞
  • 42
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郝少

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值