-
yarn命令
用法:
yarn [--config confdir] COMMAND
參數(shù) 描述 resourcemanager -format-state-store 格式化RMStateStore,只有當歷史作業(yè)不再需要時,才需要格式化 resourcemanager 啟動 ResourceManager棚蓄。用 -format-state-store for 刪除 RMStateStore跨细; 使用 -remove-application-from-state-store <appId> 從RMStateStore中刪除應用程序 nodemanager 在每個節(jié)點啟動 NodeManager timelineserver 啟動 timeline server rmadmin 管理工具 version 版本信息 jar <jar> 運行 jar 文件 application 查看應用程序狀態(tài)斑胜,或終止應用程序 applicationattempt 打印應用程序嘗試報告 container 打印 Container 嘗試報告 node 打印節(jié)點嘗試報告 queue 打印對列信息猪瞬,只有一個參數(shù) logs 主要用于收集作業(yè)日志观腊,注意要等程序結束才能查看日志 classpath 打印 Hadoop 相關依賴和其他依賴庫 daemonlog 針對指定的守護進程獲取/設置日志優(yōu)先級 top 啟動集群使用工具 CLASSNAME 啟動 CLASSNAME 類 示例:
[root@cdh01:~]# yarn version Hadoop 2.6.0-cdh5.12.1 Subversion http://github.com/cloudera/hadoop -r 520d8b072e666e9f21d645ca6a5219fc37535a52 Compiled by jenkins on 2017-08-24T16:43Z Compiled with protoc 2.5.0 From source with checksum de51bf9693ab9426379a1cd28142cea0 This command was run using /opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/jars/hadoop-common-2.6.0-cdh5.12.1.jar
-
yarn rmadmin 命令
用法:
Usage: yarn rmadmin COMMAND
參數(shù) 描述 -refreshQueues 重載隊列的ACL铛绰、狀態(tài)和調度器特定的屬性绰上,ResourceManager將重新加載mapred-queues配置文件 -refreshNodes [-g [timeout in seconds] -client server] 刷新dfs.hosts和dfs.hosts.exclude配置文件,這種方式無需重啟NameNode -refreshSuperUserGroupsConfiguration 刷新用戶組的配置 -refreshUserToGroupsMappings 刷新用戶到組的映射 -refreshAdminAcls 刷新 ResourceManager 的 ACL 管理 -refreshServiceAcl ResourceManager 重載服務級別的授權文件 -getGroups [username] 獲取指定用戶所屬的組 -help [cmd] 顯示指定命令的幫助析珊,沒有指定羡鸥,則顯示全部指令幫助 -addToClusterNodeLabels [label1,label2,label3] (label splitted by ",") 添加標簽 -removeFromClusterNodeLabels [label1,label2,label3] (label splitted by ",") 移除標簽 -replaceLabelsOnNode [label1,label2,label3] (label splitted by ",") 替換標簽 -directlyAccessNodeLabelStore -transitionToActive <serviceId> [--forceactive] -transitionToStandby <serviceId> -failover [--forcefence] [--forceactive] <serviceId> <serviceId> -getServiceState <serviceId> -checkHealth <serviceId> 示例:
[root@cdh01:~]# yarn rmadmin -getGroups hdfs hdfs : hdfs hadoop supergroup
-
yarn application 命令
用法:
Usage: yarn application COMMAND
參數(shù) 描述 -appStates <States> 與 -list 配合使用,基于應用程序的狀態(tài)來過濾,多個狀態(tài)用逗號分隔狀態(tài)忠寻。有效的狀態(tài): ALL,NEW,NEW_SAVING,SUBMITTED,ACCEPTED,RUNNING,FINISHED,FAILED,KILLED -appTypes <Types> 與 -list 配合使用惧浴,基于應用程序的類型來過濾,多個應用程序用逗號分隔 -help 幫助列表 -kill <Application ID> 殺死指定的應用程序 -list 從 ResourceManager 獲取應用程序列表. 使用 -appTypes 基于應用程序的類型來過濾 使用 -appStates 基于應用程序的狀態(tài)來過濾 -movetoqueue <Application ID> 將應用程序移動到不同的隊列 -queue <Queue Name> 與 movetoqueue配合使用奕剃,移到指定隊列 -status <Application ID> 獲取應用程序的狀態(tài) 示例:
[root@cdh01:~]# yarn application -status application_1557221110563_0246 ... Application Report : Application-Id : application_1557221110563_0246 Application-Name : INSERT OVERWRITE TABLE hdsc...hdsc.base_user(Stage-1) Application-Type : MAPREDUCE User : admin Queue : default Start-Time : 1557366149859 Finish-Time : 1557366154321 Progress : 100% State : KILLED Final-State : KILLED Tracking-URL : null RPC Port : -1 AM Host : N/A Aggregate Resource Allocation : 3111 MB-seconds, 2 vcore-seconds Log Aggregation Status : NOT_START Diagnostics : Application killed by user.
-
yarn applicationattempt 命令
用法:
Usage: yarn applicationattempt COMMAND
參數(shù) 描述 -help 幫助列表 -list <Application ID> 獲取應用程序嘗試的列表 -status <Application Attempt ID> 獲取應用程序嘗試的狀態(tài) 示例:
[root@cdh01:~]# yarn applicationattempt -list application_1557221110563_0246 ... Total number of application attempts :1 ApplicationAttempt-Id State AM-Container-Id Tracking-URL appattempt_1557221110563_0246_000001 KILLED container_e52_1557221110563_0246_01_000002 http://slave1:8088/proxy/application_1557221110563_0246/ [root@cdh01:~]# yarn applicationattempt -status appattempt_1557221110563_0246_000001 Application Attempt Report : ApplicationAttempt-Id : appattempt_1557221110563_0246_000001 State : KILLED AMContainer : container_e52_1557221110563_0246_01_000002 Tracking-URL : http://slave1:8088/proxy/application_1557221110563_0246/ RPC Port : -1 AM Host : N/A Diagnostics : Attempt recovered after RM restart
-
yarn container 命令
用法:
Usage: yarn container COMMAND
參數(shù) 描述 -help 幫助列表 -list <Application Attempt ID> 獲取 Container 列表 -status <Container ID> 獲取 Container 的狀態(tài) 示例:
[root@cdh01:~]# yarn container -list appattempt_1557221110563_0369_000001 ... Total number of containers :0 Container-Id Start Time Finish Time State Host LOG-URL
-
yarn node 命令
用法:
yarn node COMMAND
參數(shù) 描述 -all 與 -list 打印所有節(jié)點的報告 -list 獲取所有 RUNNING 狀態(tài)的節(jié)點衷旅。 支持 -states 選項過濾指定的狀態(tài)捐腿。節(jié)點狀態(tài)包括 NEW,RUNNING,UNHEALTH,DECOMMISSIONED,LOST 和 REBOOTED -states <States> 與 -list 配合使用,用逗號分隔節(jié)點狀態(tài)柿顶,只顯示這些狀態(tài)的節(jié)點信息 -status <NodeId> 獲取指點節(jié)點的狀態(tài) 示例:
[root@cdh01:~]# yarn node -all -list ... Total Nodes:5 Node-Id Node-State Node-Http-Address Number-of-Running-Containers cdh01:8041 RUNNING cdh01:8042 0 cdh02:8041 RUNNING cdh02:8042 0 cdh03:8041 RUNNING cdh03:8042 0 cdh04:8041 RUNNING cdh04:8042 0 cdh05:8041 RUNNING cdh05:8042 0 [root@cdh01:~]# yarn node -status cdh01:8041 Node Report : Node-Id : cdh01:8041 Rack : /default Node-State : RUNNING Node-Http-Address : cdh01:8042 Last-Health-Update : Thu 30/May/19 08:14:31:270CST Health-Report : Containers : 0 Memory-Used : 0MB Memory-Capacity : 12288MB CPU-Used : 0 vcores CPU-Capacity : 4 vcores Node-Labels :
-
yarn queue 命令
用法:
yarn queue COMMAND
參數(shù) 描述 -help 幫助列表 -status <Queue Name> 獲取隊列的狀態(tài) 示例:
[root@cdh01:~]# yarn queue -status default ... Queue Information : Queue Name : root.default State : RUNNING Capacity : .0% Current Capacity : .0% Maximum Capacity : -100.0% Default Node Label expression : Accessible Node Labels :
-
yarn logs 命令
用法:
yarn logs -applicationId <application ID> [OPTIONS]
參數(shù) 描述 -appOwner <Application Owner> 指定應用程序的所有者 -containerId <Container ID> 指定運行任務的 Container ID -nodeAddress <Node Address> 指定運行任務的節(jié)點茄袖,格式為 host:name -
yarn daemonlog 命令
用法:
yarn daemonlog -getlevel <host:port> <classname> [-protocol (http|https)] 或 yarn daemonlog -setlevel <host:port> <classname> <level> [-protocol (http|https)]
參數(shù) 描述 -getlevel <host:port> <classname> 針對指定的守護進程獲取日志優(yōu)先級 -setlevel <host:port> <classname> <level> [-protocol (http https) 針對指定的守護進程設置日志優(yōu)先級 示例:
[root@cdh01:~]# yarn daemonlog -getlevel cdh01:50075 org.apache.hadoop.hdfs.server.datanode.DataNode root@bigdata-sit-54:~# yarn daemonlog -getlevel bigdata-sit-54:50075 org.apache.hadoop.hdfs.server.datanode.DataNode Connecting to http://cdh01:50075/logLevel?log=org.apache.hadoop.hdfs.server.datanode.DataNode Submitted Log Name: org.apache.hadoop.hdfs.server.datanode.DataNode Log Class: org.apache.commons.logging.impl.Log4JLogger Effective Level: INFO [root@cdh01:~]# yarn daemonlog -getlevel cdh01:8088 org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl Connecting to http://cdh01:8088/logLevel?log=org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl Submitted Log Name: org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl Log Class: org.apache.commons.logging.impl.Log4JLogger Effective Level: INFO [root@cdh01:~]# yarn daemonlog -getlevel cdh01:19888 org.apache.hadoop.mapreduce.v2.hs.JobHistory Connecting to http://cdh01:19888/logLevel?log=org.apache.hadoop.mapreduce.v2.hs.JobHistory Submitted Log Name: org.apache.hadoop.mapreduce.v2.hs.JobHistory Log Class: org.apache.commons.logging.impl.Log4JLogger Effective Level: INFO
Yarn 常用命令
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
- 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來扑馁,“玉大人涯呻,你說我怎么就攤上這事∧逡” “怎么了复罐?”我有些...
- 正文 為了忘掉前任乱投,我火速辦了婚禮,結果婚禮上顷编,老公的妹妹穿的比我還像新娘戚炫。我一直安慰自己,他們只是感情好媳纬,可當我...
- 文/花漫 我一把揭開白布双肤。 她就那樣靜靜地躺著,像睡著了一般钮惠。 火紅的嫁衣襯著肌膚如雪茅糜。 梳的紋絲不亂的頭發(fā)上,一...
- 文/蒼蘭香墨 我猛地睜開眼峦筒,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了窗慎?” 一聲冷哼從身側響起物喷,我...
- 正文 年R本政府宣布嘱么,位于F島的核電站狮含,受9級特大地震影響,放射性物質發(fā)生泄漏拱撵。R本人自食惡果不足惜辉川,卻給世界環(huán)境...
- 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望拴测。 院中可真熱鬧乓旗,春花似錦、人聲如沸集索。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽务荆。三九已至妆距,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間函匕,已是汗流浹背娱据。 一陣腳步聲響...
推薦閱讀更多精彩內容
- Different Components NodeManager The NodeManager is YARN‘...
- 一、系統(tǒng)參數(shù)配置優(yōu)化 1属铁、系統(tǒng)內核參數(shù)優(yōu)化配置 修改文件/etc/sysctl.conf眠寿,添加如下配置,然后執(zhí)行s...