YARN 命令总结

起因:YARN 使用capability schedule queue调度container,spark 的app卡死在YARN的队列里面无法出来,无奈请教大神时,可用[yarn application [option]]命令去操纵yarn的应用。

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

可以查看yarnapplication的状态,配合-list使用,e.g:

yarn application -list -appStates FAILED

[output descbribe]:

[1.总数]Total number of applications (application-types: [] and states: [FAILED]):4
[2.信息表头]

Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL
[3.对应表头的内容]

application_1489637571965_0120 org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 SPARK hdfs root.hdfs FAILED FAILED 0% http://m.test.com:8088/cluster/app/application_1489637571965_0120

-appTypes <Types> Works with -list to filter applications
based on input comma-separated list of
application types.

查看application的类型:如SPARK、ZEPPELIN等等。

-help Displays help for all commands.
-kill <Application ID> Kills the application.

注意使用这个命令要小心,kill掉可能会导致zeppelin只有一个sparkContext时,notebook无法执行。

-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.

将某个ID application移出到不同的队列

 

-queue <Queue Name> Works with the movetoqueue command to
specify which queue to move an
application to.

结合-list 和 -movetoqueue使用,e.g:

yarn application -list -queue root.hdfs

[output]:

Total number of applications (application-types: [] and states: [SUBMITTED, ACCEPTED, RUNNING]):2
Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL
application_1489637571965_0193 Zeppelin SPARK hdfs root.hdfs RUNNING UNDEFINED 10% http://192.168.66.49:4040
application_1489637571965_0165 org.apache.spark.sql.hive.thriftserver.HiveThriftServer2 SPARK hdfs root.default RUNNING UNDEFINED 10% http://192.168.66.49:5050

-status <Application ID> Prints the status of the application.

查看对应id application的状态信息

转载于:https://www.cnblogs.com/liuyifeng/p/6609741.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
对于本地没有安装yarn命令的情况,你可以按照以下步骤进行安装: 1. 首先,你需要确保你已经安装了Node.js。你可以在Node.js官方网站上下载并安装最新版本的Node.js。 2. 安装yarn的推荐方式是使用npm(Node包管理器)。打开终端或命令提示符窗口,并运行以下命令来全局安装yarn: ``` npm install -g yarn ``` 这将下载并安装yarn的最新版本。 3. 安装完成后,你可以通过运行以下命令来验证yarn是否成功安装: ``` yarn --version ``` 如果成功安装,你将看到yarn的版本号。 现在你应该已经成功安装了yarn,并可以在本地使用yarn命令了。如果你仍然遇到问题,请确保按照上述步骤正确安装了Node.js和yarn,并检查你的环境变量设置是否正确。 #### 引用[.reference_title] - *1* [yarn的安装与使用,以及一些常用命令](https://blog.csdn.net/Yajyaj123/article/details/126933532)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [hadoop yarn命令下载运行日志和结束yarn任务命令笔记](https://blog.csdn.net/xiaoleilei666/article/details/122251295)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [【那些年,我们一脸懵逼的yarn命令yarn基本命令实践总结(建议收藏)](https://blog.csdn.net/qq_41018861/article/details/118490489)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值