1 Star 0 Fork 1

fastbird2016/spark-source-analysis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
MapOutputTracker.txt 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
fastbird2016 提交于 2016-11-10 13:55 +08:00 . init ...
---
date: 2016-06-12 10:15
status: public
title: MapOutputTracker
---
#MapOutputTracker
------
##MapoutputTrackerMaster
------
##MapOutputTrackerWorker
------
#ShuffleManager
重要接口
class BaseShuffleHandle[K,V,C](shuffleId:Int,numMaps:Int,dependency:ShuffleDependency[K,V,C])
class BlockStoreShufflerReader[K,C](handle:BaseShuffleHandle[K,_,C],startPartition:Int,endPartition:Int,context:TaskContext,blockManager:BlockManager=SparkEnv.get.blockManager,mapOutputTracker:MapOutputTracker=SparkEnv.get.mapOutputTracker)
class HashShuffleWriter[K,V](shufflerBlockResolver:FileShufflerBlockResolver,handler:BaseShufflerHandle[K,V,_],mapId:Int,context:TaskContext)
1. def registerShuffle[K,V,C](shuffleId:Int,numMaps:Int,dependency:ShuffleDependency[K,V,C]):ShuffleHandler
2. def getReader[K,C](handle:ShuffleHandle,startPartition:Int,endPartition:Int,context:TaskContext):ShuffleReader[K,C]
3. def getWriter[K,V](handle:ShuffleHandle,mapId:Int,context:TaskContext):ShuffleWriter[K,V]
˙##HashShuffleManager
##SortShuffleManager
val newValue:V=entry._2
val update:(Boolean,V)=>V=(hasValue:Boolean,OldValue:C){
if(hasValue) mergeValue(oldValue,newValue) else createCombiner(newValue)
}
createCombiner:V=>C
mergeValue:(C,V)=>C
mergeCombiner:(C,C)=>C
new Aggregator[K,V,C](createCombiner,mergeValue,mergeCombiner)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Scala
1
https://gitee.com/fastbird2016/spark-source-analysis.git
git@gitee.com:fastbird2016/spark-source-analysis.git
fastbird2016
spark-source-analysis
spark-source-analysis
master

搜索帮助