配置hadoop 使用fair scheduler排程器
配置步驟為
1. 將$HADOOP_HOME/contrib/fairscheduler/hadoop-fairscheduler-0.20.2-cdh3u3.jar複製到$HADOOP_HOME/lib資料夾中
2. 修改$HADOOP_HOME/conf/mapred-site.xml配置檔案
- <property>
- <name>mapred.jobtracker.taskSchedulername>
- <value>org.apache.hadoop.mapred.FairSchedulervalue>
- property>
- <property>
- <name>mapred.fairscheduler.allocation.filename>
- <value>/home/hadoop/hadoop-0.20.2-cdh3u3/conf/fair-scheduler.xmlvalue>
- property>
- <property>
- <name>mapred.fairscheduler.preemptionname>
- <value>truevalue>
- property>
- <property>
- <name>mapred.fairscheduler.assignmultiplename>
- <value>truevalue>
- property>
- <property>
- <name>mapred.fairscheduler.poolnamepropertyname>
- <value>mapred.queue.namevalue>
- <description>job.set("mapred.queue.name",pool); // pool is set to either 'high' or 'low' description>
- property>
- <property>
- <name>mapred.fairscheduler.preemption.only.logname>
- <value>truevalue>
- property>
- <property>
- <name>mapred.fairscheduler.preemption.intervalname>
- <value>15000value>
- property>
- <property>
- <name>mapred.queue.namesname>
- <value>default,hadoop,hivevalue>
- property>
3. 在$HADOOP_HOME/conf/新建配置檔案fair-scheduler.xml
- xml version="1.0"?>
- <allocations>
- <pool name="hive">
- <minMaps>90minMaps>
- <minReduces>20minReduces>
- <maxRunningJobs>20maxRunningJobs>
- <weight>2.0weight>
- <minSharePreemptionTimeout>30minSharePreemptionTimeout>
- pool>
- <pool name="hadoop">
- <minMaps>9minMaps>
- <minReduces>2minReduces>
- <maxRunningJobs>20maxRunningJobs>
- <weight>1.0weight>
- <minSharePreemptionTimeout>30minSharePreemptionTimeout>
- pool>
- <user name="hadoop">
- <maxRunningJobs>6maxRunningJobs>
- user>
- <poolMaxJobsDefault>10poolMaxJobsDefault>
- <userMaxJobsDefault>8userMaxJobsDefault>
- <defaultMinSharePreemptionTimeout>600defaultMinSharePreemptionTimeout>
- <fairSharePreemptionTimeout>600fairSharePreemptionTimeout>
- allocations>
4. 在叢集的各個節點執行以上步驟,然後重啟叢集,在 即可檢視到排程器執行狀態,如果修改排程器配置的話,只需要修改檔案fair-scheduler.xml ,不需重啟配置即可生效。
5. 在執行hive任務時,設定hive屬於的佇列set mapred.queue.name=hadoop; (set mapred.job.queue.name=hadoop;)
設定hive的任務名稱set mapred.job.name=goldts;
設定任務的優先順序別set mapred.job.priority=HIGH;
6. 如果在執行MR JOB的時候出現XX使用者訪問不了YY佇列的話,就需要在mapred-queue-acls.xml裡配置相應的屬性,來對訪問許可權進行控制,比如:
- <property>
- <name>mapred.queue.default.acl-submit-jobname>
- <value>*value>
- <description> Comma separated list of user and group names that are allowed
- to submit jobs to the 'default' queue. The user list and the group list
- are separated by a blank. For e.g. user1,user2 group1,group2.
- If set to the special value '*', it means all users are allowed to
- submit jobs. If set to ' '(i.e. space), no user will be allowed to submit
- jobs.
- It is only used if authorization is enabled in Map/Reduce by setting the
- configuration property mapred.acls.enabled to true.
- Irrespective of this ACL configuration, the user who started the cluster and
- cluster administrators configured via
- mapreduce.cluster.administrators can submit jobs.
- description>
- property>
- <property>
- <name>mapred.queue.default.acl-administer-jobsname>
- <value>*value>
- <description> Comma separated list of user and group names that are allowed
- to view job details, kill jobs or modify job's priority for all the jobs
- in the 'default' queue. The user list and the group list
- are separated by a blank. For e.g. user1,user2 group1,group2.
- If set to the special value '*', it means all users are allowed to do
- this operation. If set to ' '(i.e. space), no user will be allowed to do
- this operation.
- It is only used if authorization is enabled in Map/Reduce by setting the
- configuration property mapred.acls.enabled to true.
- Irrespective of this ACL configuration, the user who started the cluster and
- cluster administrators configured via
- mapreduce.cluster.administrators can do the above operations on all the jobs
- in all the queues. The job owner can do all the above operations on his/her
- job irrespective of this ACL configuration.
- description>
- property>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29754888/viewspace-1248017/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- goroutine 排程器(scheduler)Go
- CDH5 Fair scheduler 配置H5AI
- Hadoop多使用者資源管理–Fair Scheduler介紹與配置(Yarn)HadoopAIYarn
- 【MySQL】事件排程器 (Event Scheduler)MySql事件
- hadoop Capacity Scheduler計算能力排程器配置Hadoop
- Pod的排程是由排程器(kube-scheduler)
- golang 原始碼分析之scheduler排程器Golang原始碼
- Fair Scheduler與Capacity Scheduler介紹AI
- oracle使用DBMS_SCHEDULER排程作業Oracle
- Hadoop排程器原理解析Hadoop
- RxJava原始碼解析(二)—執行緒排程器SchedulerRxJava原始碼執行緒
- 使用DBMS_SCHEDULER排程作業系統shell指令碼作業系統指令碼
- oracle排程程式作業dbms_schedulerOracle
- Oracle 排程程式作業( dbms_scheduler )Oracle
- 【I/O scheduler】Linux的磁碟排程策略Linux
- 詳解 MySQL 用事件排程器 Event Scheduler 建立定時任務MySql事件
- 詳解MySQL用事件排程器Event Scheduler建立定時任務MySql事件
- Apache Oozie 教程:使用 Oozie 排程 Hadoop 作業ApacheHadoop
- Flink排程之排程器、排程策略、排程模式模式
- Hadoop - Azkaban 作業排程Hadoop
- Hadoop作業排程機制Hadoop
- kube-scheduler原始碼分析(3)-搶佔排程分析原始碼
- CCAH-CCA-500-5題:How will the Fair Scheduler handle these two jobs?AI
- Go排程器系列(2)巨集觀看排程器Go
- 不可不知的資源管理排程器Hadoop YarnHadoopYarn
- Android非同步框架RxJava 1.x系列(三) - 執行緒排程器SchedulerAndroid非同步框架RxJava執行緒
- Crane-scheduler:基於真實負載進行排程負載
- Spring中Quartz排程器的使用Springquartz
- MySQL 配置InnoDB清理排程MySql
- Go語言排程器之主動排程(20)Go
- Go排程器系列(3)圖解排程原理Go圖解
- Hadoop Yarn Capacity SchedulerHadoopYarn
- Oracle無法自動排程DBMS_JOB&DBMS_SCHEDULER案例分析Oracle
- MYSQL事件排程器MySql事件
- Hadoop - 任務排程系統比較Hadoop
- 【技術乾貨】華為雲FusionInsight MRS的自研超級排程器Superior Scheduler
- Go runtime 排程器精講(二):排程器初始化Go
- 排程器簡介,以及Linux的排程策略Linux