SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Introduction to
Hadoop TaskScheduler
         July 11, 2012
       Guangxian Liao
  Big Data Engineering Team
         Hanborq Inc.
MapReduce任务调度
•   配置:mapred.jobtracker.taskScheduler
•   插件式Task调度器
•   基类TaskScheduler
•   JT收到TT的心跳时,使用调度器分配Task




                                         2
Task调度器
           调度器                                      介绍


   JobQueueTaskScheduler             一个队列,FIFO,可以指定优先级

CapacityTaskScheduler(contrib目   多个队列,每个队列可以指定资源百分比,
              录)                 FIFO,支持优先级。可以设定单个用户占用
                                        队列资源的百分比上限
  FairScheduler(contrib目录)       默认每个用户有单独的Job pool,缺省平均
                                 分配资源,每个job可以配置优先级,每个
                                 pool可以配置权值和最低资源保障,支持
                                          Slot抢占。
LimitTasksPerJobTaskScheduler    基本功能和JobQueueTaskScheduler一样,可
                                  以指定每个Job同时运行的Task数量上限
                                 mapred.jobtracker.scheduler.maxRunningTasks
                                                    PerJob

                                                                               3
JobQueueTaskScheduler调度策略
• 按照数据局部性分配MapTask。

• 保证每个TaskTracker负载比较均衡。

• 默认TaskTracker和Map处理的数据片(split)在同一个节点或者同一个机
  架认为是LocalMapTask。

• 网络拓扑由脚本来提供,脚本负责获取主机对应的拓扑位置。
  ${topology.script.file.name}

• 可以一次heartbeat分配多个LocalMapTask。

• 如果没有LocalMapTask可以分配,则可以分配一个NonLocalMapTask。

• ReduceTask一次最多分配一个。


                                               4
FairScheduler配置
•   配置:mapred.fairscheduler.poolnameproperty
•   Job的poolname由哪个JobConf参数来指定。
•   默认是user.name,按照用户分pool
•   也可以指定为mapred.job.queue.name
•   或者group.name




                                               5
FairScheduler配置
• 配置:mapred.fairscheduler.pool
• 用户可以直接指定job放入哪个pool
• 配置这个参数后,mapred.fairscheduler.poolnameproperty
  失效




                                                  6
FairScheduler配置
• 配置:mapred.fairscheduler.allocation.file
• Pool分配的xml文件的路径
• Absolute path




                                            7
FairScheduler xml文件举例
• <?xml version="1.0"?>
  <allocations>
   <pool name="sample_pool">
    <minMaps>5</minMaps>
    <minReduces>5</minReduces>
    <weight>2.0</weight>
   </pool>
   <user name="sample_user">
    <maxRunningJobs>6</maxRunningJobs>
   </user>
   <userMaxJobsDefault>3</userMaxJobsDefault>
  </allocations>




                                                8
FairScheduler Task抢占
• mapred.fairscheduler.preemption
• Default:false
• 是否支持抢占




                                    9
两种情况会抢占
• 一个Pool一定时间内没有分配到最低的资源
• 一个Job一定时间内没有占用到它应该被分
  配资源的一半。




                      10
The End
Thank You Very Much!
    liaoguangxian@gmail.com




                              11

Weitere ähnliche Inhalte

Was ist angesagt?

Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
Web请求异步处理和海量数据即时分析在淘宝开放平台的实践Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
Web请求异步处理和海量数据即时分析在淘宝开放平台的实践mysqlops
 
Hbase运维碎碎念
Hbase运维碎碎念Hbase运维碎碎念
Hbase运维碎碎念haiyuan ning
 
Spark streaming经验介绍
Spark streaming经验介绍Spark streaming经验介绍
Spark streaming经验介绍Wenchun Xu
 
TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例maclean liu
 
Spark性能调优分享
Spark性能调优分享Spark性能调优分享
Spark性能调优分享Wenchun Xu
 
深入了解Oracle自动内存管理asmm
深入了解Oracle自动内存管理asmm深入了解Oracle自动内存管理asmm
深入了解Oracle自动内存管理asmmmaclean liu
 
Hadoop-分布式数据平台
Hadoop-分布式数据平台Hadoop-分布式数据平台
Hadoop-分布式数据平台Jacky Chi
 
HDInsight for Microsoft Users
HDInsight for Microsoft UsersHDInsight for Microsoft Users
HDInsight for Microsoft UsersKuo-Chun Su
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadooptaishanla
 
PostgreSQL 9 Standby
PostgreSQL 9 StandbyPostgreSQL 9 Standby
PostgreSQL 9 StandbyMarch Liu
 
Distributed Data Analytics at Taobao
Distributed Data Analytics at TaobaoDistributed Data Analytics at Taobao
Distributed Data Analytics at TaobaoMin Zhou
 
PostgreSQL Search
PostgreSQL SearchPostgreSQL Search
PostgreSQL Searchguestb75c3a
 
海量日志分析系统实践,Dba
海量日志分析系统实践,Dba海量日志分析系统实践,Dba
海量日志分析系统实践,DbaCevin Cheung
 
HDInsight for Hadoopers
HDInsight for HadoopersHDInsight for Hadoopers
HDInsight for HadoopersKuo-Chun Su
 
Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學NUTC, imac
 
分区表基础知识培训
分区表基础知识培训分区表基础知识培训
分区表基础知识培训maclean liu
 
准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究Min Zhou
 
Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系Wei-Yu Chen
 

Was ist angesagt? (20)

Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
Web请求异步处理和海量数据即时分析在淘宝开放平台的实践Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
 
Hbase运维碎碎念
Hbase运维碎碎念Hbase运维碎碎念
Hbase运维碎碎念
 
Hadoop hive
Hadoop hiveHadoop hive
Hadoop hive
 
Spark streaming经验介绍
Spark streaming经验介绍Spark streaming经验介绍
Spark streaming经验介绍
 
TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例
 
Spark性能调优分享
Spark性能调优分享Spark性能调优分享
Spark性能调优分享
 
深入了解Oracle自动内存管理asmm
深入了解Oracle自动内存管理asmm深入了解Oracle自动内存管理asmm
深入了解Oracle自动内存管理asmm
 
Hadoop-分布式数据平台
Hadoop-分布式数据平台Hadoop-分布式数据平台
Hadoop-分布式数据平台
 
HDInsight for Microsoft Users
HDInsight for Microsoft UsersHDInsight for Microsoft Users
HDInsight for Microsoft Users
 
使用Ubuntu架設hadoop
使用Ubuntu架設hadoop使用Ubuntu架設hadoop
使用Ubuntu架設hadoop
 
PostgreSQL 9 Standby
PostgreSQL 9 StandbyPostgreSQL 9 Standby
PostgreSQL 9 Standby
 
Distributed Data Analytics at Taobao
Distributed Data Analytics at TaobaoDistributed Data Analytics at Taobao
Distributed Data Analytics at Taobao
 
PostgreSQL Search
PostgreSQL SearchPostgreSQL Search
PostgreSQL Search
 
海量日志分析系统实践,Dba
海量日志分析系统实践,Dba海量日志分析系统实践,Dba
海量日志分析系统实践,Dba
 
HDInsight for Hadoopers
HDInsight for HadoopersHDInsight for Hadoopers
HDInsight for Hadoopers
 
Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學Spark 巨量資料處理基礎教學
Spark 巨量資料處理基礎教學
 
分区表基础知识培训
分区表基础知识培训分区表基础知识培训
分区表基础知识培训
 
准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究准实时海量数据分析系统架构探究
准实时海量数据分析系统架构探究
 
Oracle Instance 介紹
Oracle Instance 介紹Oracle Instance 介紹
Oracle Instance 介紹
 
Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系Hadoop ecosystem - hadoop 生態系
Hadoop ecosystem - hadoop 生態系
 

Andere mochten auch

Hadoop Summit 2012 | Optimizing MapReduce Job Performance
Hadoop Summit 2012 | Optimizing MapReduce Job PerformanceHadoop Summit 2012 | Optimizing MapReduce Job Performance
Hadoop Summit 2012 | Optimizing MapReduce Job PerformanceCloudera, Inc.
 
Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)Emilio Coppa
 
Hadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureHadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureP. Taylor Goetz
 
Hadoop introduction , Why and What is Hadoop ?
Hadoop introduction , Why and What is  Hadoop ?Hadoop introduction , Why and What is  Hadoop ?
Hadoop introduction , Why and What is Hadoop ?sudhakara st
 
Seminar Presentation Hadoop
Seminar Presentation HadoopSeminar Presentation Hadoop
Seminar Presentation HadoopVarun Narang
 

Andere mochten auch (6)

Hadoop architecture by ajay
Hadoop architecture by ajayHadoop architecture by ajay
Hadoop architecture by ajay
 
Hadoop Summit 2012 | Optimizing MapReduce Job Performance
Hadoop Summit 2012 | Optimizing MapReduce Job PerformanceHadoop Summit 2012 | Optimizing MapReduce Job Performance
Hadoop Summit 2012 | Optimizing MapReduce Job Performance
 
Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)Hadoop Internals (2.3.0 or later)
Hadoop Internals (2.3.0 or later)
 
Hadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm ArchitectureHadoop Summit Europe 2014: Apache Storm Architecture
Hadoop Summit Europe 2014: Apache Storm Architecture
 
Hadoop introduction , Why and What is Hadoop ?
Hadoop introduction , Why and What is  Hadoop ?Hadoop introduction , Why and What is  Hadoop ?
Hadoop introduction , Why and What is Hadoop ?
 
Seminar Presentation Hadoop
Seminar Presentation HadoopSeminar Presentation Hadoop
Seminar Presentation Hadoop
 

Ähnlich wie Hadoop MapReduce Task Scheduler Introduction

Nosql三步曲
Nosql三步曲Nosql三步曲
Nosql三步曲84zhu
 
Node cluster
Node clusterNode cluster
Node clusteraleafs
 
Hadoop 0.23 m_rv2_introduction
Hadoop 0.23 m_rv2_introductionHadoop 0.23 m_rv2_introduction
Hadoop 0.23 m_rv2_introductionJinGui LI
 
MySQL压力测试经验
MySQL压力测试经验MySQL压力测试经验
MySQL压力测试经验Jinrong Ye
 
Zh tw introduction_to_map_reduce
Zh tw introduction_to_map_reduceZh tw introduction_to_map_reduce
Zh tw introduction_to_map_reduceTrendProgContest13
 
ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1medcl
 
淘宝主备数据库自动切换
淘宝主备数据库自动切换淘宝主备数据库自动切换
淘宝主备数据库自动切换mysqlops
 
诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础 诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础 maclean liu
 
10, OCP - flashback
10, OCP - flashback10, OCP - flashback
10, OCP - flashbackted-xu
 
Large-Scale Cluster Mangement & Kubernetes Under The Hood
Large-Scale Cluster Mangement & Kubernetes Under The HoodLarge-Scale Cluster Mangement & Kubernetes Under The Hood
Large-Scale Cluster Mangement & Kubernetes Under The HoodLei (Harry) Zhang
 
实时任务调度
实时任务调度实时任务调度
实时任务调度Tony Deng
 
1, OCP - architecture intro
1, OCP - architecture intro1, OCP - architecture intro
1, OCP - architecture introted-xu
 
百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010Chuanying Du
 
Kmeans in-hadoop
Kmeans in-hadoopKmeans in-hadoop
Kmeans in-hadoopTianwei Liu
 
線上埋碼資料收集實作
線上埋碼資料收集實作線上埋碼資料收集實作
線上埋碼資料收集實作FEG
 
基于Spring batch的大数据量并行处理
基于Spring batch的大数据量并行处理基于Spring batch的大数据量并行处理
基于Spring batch的大数据量并行处理Jacky Chi
 
【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410
【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410
【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410maclean liu
 
MySQL多机房容灾设计(with Multi-Master)
MySQL多机房容灾设计(with Multi-Master)MySQL多机房容灾设计(with Multi-Master)
MySQL多机房容灾设计(with Multi-Master)Lixun Peng
 
Log collection
Log collectionLog collection
Log collectionFEG
 

Ähnlich wie Hadoop MapReduce Task Scheduler Introduction (20)

Kafka in Depth
Kafka in DepthKafka in Depth
Kafka in Depth
 
Nosql三步曲
Nosql三步曲Nosql三步曲
Nosql三步曲
 
Node cluster
Node clusterNode cluster
Node cluster
 
Hadoop 0.23 m_rv2_introduction
Hadoop 0.23 m_rv2_introductionHadoop 0.23 m_rv2_introduction
Hadoop 0.23 m_rv2_introduction
 
MySQL压力测试经验
MySQL压力测试经验MySQL压力测试经验
MySQL压力测试经验
 
Zh tw introduction_to_map_reduce
Zh tw introduction_to_map_reduceZh tw introduction_to_map_reduce
Zh tw introduction_to_map_reduce
 
ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1ElasticSearch Training#2 (advanced concepts)-ESCC#1
ElasticSearch Training#2 (advanced concepts)-ESCC#1
 
淘宝主备数据库自动切换
淘宝主备数据库自动切换淘宝主备数据库自动切换
淘宝主备数据库自动切换
 
诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础 诗檀软件 Oracle开发优化基础
诗檀软件 Oracle开发优化基础
 
10, OCP - flashback
10, OCP - flashback10, OCP - flashback
10, OCP - flashback
 
Large-Scale Cluster Mangement & Kubernetes Under The Hood
Large-Scale Cluster Mangement & Kubernetes Under The HoodLarge-Scale Cluster Mangement & Kubernetes Under The Hood
Large-Scale Cluster Mangement & Kubernetes Under The Hood
 
实时任务调度
实时任务调度实时任务调度
实时任务调度
 
1, OCP - architecture intro
1, OCP - architecture intro1, OCP - architecture intro
1, OCP - architecture intro
 
百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010百度系统部分布式系统介绍 马如悦 Sacc2010
百度系统部分布式系统介绍 马如悦 Sacc2010
 
Kmeans in-hadoop
Kmeans in-hadoopKmeans in-hadoop
Kmeans in-hadoop
 
線上埋碼資料收集實作
線上埋碼資料收集實作線上埋碼資料收集實作
線上埋碼資料收集實作
 
基于Spring batch的大数据量并行处理
基于Spring batch的大数据量并行处理基于Spring batch的大数据量并行处理
基于Spring batch的大数据量并行处理
 
【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410
【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410
【Maclean liu技术分享】开oracle调优鹰眼,深入理解awr性能报告 第二讲 正式版 20130410
 
MySQL多机房容灾设计(with Multi-Master)
MySQL多机房容灾设计(with Multi-Master)MySQL多机房容灾设计(with Multi-Master)
MySQL多机房容灾设计(with Multi-Master)
 
Log collection
Log collectionLog collection
Log collection
 

Mehr von Hanborq Inc.

Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to CassandraHanborq Inc.
 
Hadoop HDFS NameNode HA
Hadoop HDFS NameNode HAHadoop HDFS NameNode HA
Hadoop HDFS NameNode HAHanborq Inc.
 
Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验Hanborq Inc.
 
Flume and Flive Introduction
Flume and Flive IntroductionFlume and Flive Introduction
Flume and Flive IntroductionHanborq Inc.
 
Hadoop MapReduce Streaming and Pipes
Hadoop MapReduce  Streaming and PipesHadoop MapReduce  Streaming and Pipes
Hadoop MapReduce Streaming and PipesHanborq Inc.
 
HBase Introduction
HBase IntroductionHBase Introduction
HBase IntroductionHanborq Inc.
 
Hadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep InsightHadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep InsightHanborq Inc.
 
Hadoop HDFS Detailed Introduction
Hadoop HDFS Detailed IntroductionHadoop HDFS Detailed Introduction
Hadoop HDFS Detailed IntroductionHanborq Inc.
 
How to Build Cloud Storage Service Systems
How to Build Cloud Storage Service SystemsHow to Build Cloud Storage Service Systems
How to Build Cloud Storage Service SystemsHanborq Inc.
 
Hanborq Optimizations on Hadoop MapReduce
Hanborq Optimizations on Hadoop MapReduceHanborq Optimizations on Hadoop MapReduce
Hanborq Optimizations on Hadoop MapReduceHanborq Inc.
 

Mehr von Hanborq Inc. (12)

Introduction to Cassandra
Introduction to CassandraIntroduction to Cassandra
Introduction to Cassandra
 
Hadoop HDFS NameNode HA
Hadoop HDFS NameNode HAHadoop HDFS NameNode HA
Hadoop HDFS NameNode HA
 
Hadoop大数据实践经验
Hadoop大数据实践经验Hadoop大数据实践经验
Hadoop大数据实践经验
 
FlumeBase Study
FlumeBase StudyFlumeBase Study
FlumeBase Study
 
Flume and Flive Introduction
Flume and Flive IntroductionFlume and Flive Introduction
Flume and Flive Introduction
 
Hadoop MapReduce Streaming and Pipes
Hadoop MapReduce  Streaming and PipesHadoop MapReduce  Streaming and Pipes
Hadoop MapReduce Streaming and Pipes
 
HBase Introduction
HBase IntroductionHBase Introduction
HBase Introduction
 
Hadoop Versioning
Hadoop VersioningHadoop Versioning
Hadoop Versioning
 
Hadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep InsightHadoop MapReduce Introduction and Deep Insight
Hadoop MapReduce Introduction and Deep Insight
 
Hadoop HDFS Detailed Introduction
Hadoop HDFS Detailed IntroductionHadoop HDFS Detailed Introduction
Hadoop HDFS Detailed Introduction
 
How to Build Cloud Storage Service Systems
How to Build Cloud Storage Service SystemsHow to Build Cloud Storage Service Systems
How to Build Cloud Storage Service Systems
 
Hanborq Optimizations on Hadoop MapReduce
Hanborq Optimizations on Hadoop MapReduceHanborq Optimizations on Hadoop MapReduce
Hanborq Optimizations on Hadoop MapReduce
 

Hadoop MapReduce Task Scheduler Introduction