一、 yarn常用命令:
1.yarn application 查看任務(wù)
(1)列出所有Application
yarn application -list
(2)根據(jù) Application 狀態(tài)過濾:yarn application -list -appStates (所有狀態(tài):ALL、NEW、NEW_SAVING、SUBMITTED、ACCEPTED、RUNNING、FINISHED、FAILED、KILLED)
2.yarn logs 查看日志
(1)查看Application 日志
yarn logs -applicationId
(2)查詢Container 日志
yarn logs -applicationId -containerId
3.yarn applicationattempt 查看嘗試運(yùn)行的任務(wù)
(1)列出所有 Application 嘗試的列表
yarn applicationattempt -list
(2)打印 ApplicationAttemp 狀態(tài)
yarn applicationattempt -status
4. yarn container查看容器
(1)列出所有 Container yarn container -list ApplicationAttemptId>
(2)打印 Container 狀態(tài)
yarn container -status ContainerId>
5.yarn node 查看節(jié)點(diǎn)狀態(tài)
列出所有節(jié)點(diǎn)
yarn node -list -all
6.yarn rmadmin 跟新配置
yarn rmadmin -refreshQueues
7.yarn queue 查看隊(duì)列
打印隊(duì)列信息
yarn queue -status
二、常用命令匯總
1. yarn 命令行查看資源狀態(tài):
yarn top
2.查看指定queue使用情況:
yarn queue -status root.user.xxxx
示例: yarn queue -status root.j042x0
3.查看app狀態(tài):
yarn application -list -appStates 、 yarn application -list -appTypes
4.移動(dòng)app到對應(yīng)的隊(duì)列:
示例:yarn application -movetoqueue application_1528080031923_0067 -queue root.j042x0
5.kill掉某個(gè)app任務(wù):
yarn application -kill applicationId
例如:要?dú)⒌暨@個(gè)任務(wù):yarn application -kill application_1528080031923_0067
6.查看Application 日志:
yarn logs -applicationId
示例:yarn logs -applicationId application_1528080031923_0064
7.查看app狀態(tài)命令:
yarn applicationattempt -list applicationId
8.打印類路徑:
yarn classpath --glob
9. 打印正在執(zhí)行任務(wù)的容器信息:
yarn container -list appattemptId
示例:yarn container -list appattempt_1528080031923_0068_000001
10.打印當(dāng)前容器信息:
yarn container -status containerId
11. 提交任務(wù)到y(tǒng)arn:
yarn jar [mainClass] args…
12. 查看yarn集群所有節(jié)點(diǎn)信息:
yarn node -all -list文章來源:http://www.zghlxwxcb.cn/news/detail-417696.html
13. yarn application -list 根據(jù) Application 狀態(tài)過濾:
yarn application -list -appStates (所有狀態(tài):ALL、NEW、NEW_SAVING、SUBMITTED、ACCEPTED、RUNNING、FINISHED、FAILED、KILLED)
示例:yarn application -list -appStates RUNNING 查看正在運(yùn)行的應(yīng)用的狀態(tài)信息文章來源地址http://www.zghlxwxcb.cn/news/detail-417696.html
到了這里,關(guān)于yarn的常用命令的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!