Yarn - 常用命令
5 - Management
Via the application
module of the yarn cli
See the source code entry at ApplicationCLI.java
5.1 - Kill
yarn -kill application_id
5.2 - Stop
yarn -stop <Application Name or ID>
5.3 - Status
yarn app -status <ApplicationId or ApplicationName>
5.4 - Launch
yarn app -launch <Application Name> -updateLifetime and -changeQueue -appTypes <Types> <File Name> # or to start a saved application yarn start <Application Name> # or with YARN code bundled in a jar file yarn jar <jar> [mainClass] args...
where:
-
-updateLifetime
and-changeQueue
alter the values provided in the file. -
-appTypes
specify which client implementation to use
If a queue is in STOPPED state, new applications cannot be submitted.
If an app specifically lists a queue in a container resource request, the request is submitted to that queue.
A yarn app is submitted programmatically with a YarnClient interface. See Yarn - App Dev
5.5 - Move to queue
Yarn - Yarn CLI move to queue
yarn app -changeQueue <Queue Name>
# movetoqueue is Deprecated
#yarn app -movetoqueue <Application ID>
For the fairScheulder, an attempt to move an application to a queue will fail if the addition of the app’s resources to that queue would violate the its maxRunningApps or maxResources constraints.
5.6 - Modify the number of container
change the number of components/containers running for an application
yarn app -flex <Application Name or ID> -component <Component Name> <Count>
5.7 - Develop
5.8 - List
yarn app -list
Filter:
-
by type
-appTypes <Types>
-
by tag
-appTags <Tags>
-
by state
-appStates <States>
See also top
5.9 - Top
yarn top
YARN top - 14:00:34, up 11d, 2:41, 0 active users, queue(s): root NodeManager(s): 3 total, 3 active, 0 unhealthy, 0 decommissioned, 0 lost, 0 reb Queue(s) Applications: 20 running, 759 submitted, 0 pending, 739 completed, 0 k Queue(s) Mem(GB): 153 available, 146 allocated, 0 pending, 0 reserved Queue(s) VCores: 44 available, 50 allocated, 0 pending, 0 reserved Queue(s) Containers: 50 allocated, 0 pending, 0 reserved APPLICATIONID USER TYPE QUEUE #CONT #RCON application_1522322322495_0274 sshuser informatica blaze default 12 application_1522230994452_0133 admin mapreduce default 5 application_1522322322495_0687 admin mapreduce default 2 application_1522322322495_0684 admin mapreduce default 2 application_1522322322495_0682 admin mapreduce default 2 application_1522307230623_0033 admin mapreduce default 2 application_1522307230623_0060 admin mapreduce default 2 application_1522307230623_0058 admin mapreduce default 2 application_1522307230623_0020 admin mapreduce default 2 application_1522307230623_0019 admin mapreduce default 2 application_1522307230623_0018 admin mapreduce default 2 application_1522307230623_0016 admin mapreduce default 2 application_1522322322495_0233 admin mapreduce default 2 application_1522322322495_0232 admin mapreduce default 2 application_1522322322495_0231 admin mapreduce default 2 application_1522322322495_0237 admin mapreduce default 2 application_1522322322495_0235 admin mapreduce default 2 application_1522322322495_0726 admin spark default 1 application_1521626910869_0002 hive spark thriftsvr 1 application_1521626910869_0001 hive spark thriftsvr 1
5.10 - Log
yarn logs -applicationId application_1520929888341_0011
-
Set log level: see daemon log
-
See also log location
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
2018-08-31 SQL truncate/delete/drop 区别