<html>
<head>
<title>16-2,BlockManager源码剖析中</title>
<basefont face="微软雅黑" size="2" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="exporter-version" content="YXBJ Windows/600667 (zh-CN, DDL); Windows/10.0.0 (Win64);"/>
<style>
body, td {
font-family: 微软雅黑;
font-size: 10pt;
}
</style>
</head>
<body>
<a name="3192"/>
<h1>16-2,BlockManager源码剖析中</h1>
<div>
<span><div><div><div><div style="font-size: 10.8pt;"><span style="font-size: 11pt;">16-2,BlockManager源码剖析中</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; font-family: Consolas; font-weight: bold;">3,</span><span style="font-size: 11pt; font-family: Consolas; font-weight: bold;">BlockManager.scala</span></div><div><span style="font-size: 11pt; color: rgb(255, 0, 0);">/**</span></div><div><span style="font-size: 11pt; color: rgb(255, 0, 0);">* BlockManager运行在每个节点上,包括driver和executor,都会有一份,主要提供了在本地或者远程存取数据的功能</span></div><div><span style="font-size: 11pt; color: rgb(255, 0, 0);">* 支持内存、磁盘、堆外存储(Tychyon)</span></div><div><span style="font-size: 11pt; color: rgb(255, 0, 0); font-family: Consolas;">*/</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">private</span><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">[spark]</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">class</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">BlockManager(</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">executorId:</span> <span style="font-size: 10.8pt; color: rgb(32, 153, 157); font-family: Consolas;">String</span><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">rpcEnv: RpcEnv,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">val</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">master: BlockManagerMaster,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">val</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">serializerManager: SerializerManager,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">val</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">conf: SparkConf,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">memoryManager: MemoryManager,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">mapOutputTracker: MapOutputTracker,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">shuffleManager: ShuffleManager,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">val</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">blockTransferService: BlockTransferService,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">securityManager: SecurityManager,</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">numUsableCores: Int)</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">extends</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">BlockDataManager</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">with</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">BlockEvictionHandler</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">with</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">Logging {</span></div><div style="font-size: 10.8pt;"><br/></div><div style="background-color: rgb(255, 255, 255); font-size: 10.8pt;"><span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">private</span><span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">[spark]</span> <span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">val</span> <span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(102, 14, 122); font-family: Consolas; font-style: italic;">externalShuffleServiceEnabled</span> <span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">=</span></div><div style="background-color: rgb(255, 255, 255); font-size: 10.8pt;"><span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">conf.getBoolean(</span><span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 128, 0); font-family: Consolas; font-weight: bold;">"spark.shuffle.service.enabled"</span><span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">,</span> <span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">false</span><span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">)</span></div><div style="font-size: 10.8pt;"><br/></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">val</span> <span style="font-size: 10.8pt; color: rgb(102, 14, 122); font-family: Consolas; font-style: italic;">diskBlockManager</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">= {</span></div><div style="background-color: rgb(255, 255, 255); font-size: 10.8pt;"><span style="background-color: rgb(255, 255, 255); font-size: 10.8pt; color: rgb(128, 128, 128); font-family: Consolas; font-style: italic;">// Only perform cleanup if an external service is not serving our shuffle files.</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">val</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">deleteFilesOnStop =</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">!</span><span style="font-size: 10.8pt; color: rgb(102, 14, 122); font-family: Consolas; font-style: italic;">externalShuffleServiceEnabled</span> <span style="font-size: 10.8pt; color: rgb(0, 0, 0); font-family: Consolas;">|| executorId == SparkContext.</span><span style="font-size: 10.8pt; color: rgb(102, 14, 122); font-family: Consolas; font-style: italic;">DRIVER_IDENTIFIER</span></div><div style="font-size: 10.8pt;"><span style="font-size: 10.8pt; color: rgb(0, 0, 128); font-family: Consolas; font-weight: bold;">new</span> <span style="font-size: 10.8pt; color: rgb(
没有合适的资源?快使用搜索试试~ 我知道了~
Spark2.2版本内核源码深度剖析(完整笔记)

共45个文件
html:27个
png:18个


温馨提示
spark2.2是一个里程碑的版本,因为之前的版本很多特性都是实验性的,所以2.2是第一个真正完全可以把Spark的所有特性在生产环境中时候用的版本。 笔记的含金量集结了整个spark2.2源码的精华,不会多一点延伸内容,因为我们读源码是为了在性能调试以及线上故障的时候能够快速看懂log日志,然后准确找到问题根源,是修改程序代码还是调整配置,所以笔记不会把一个言简意赅的东西说那么复杂,因为不是出书;当然也不会少一点整个spark内核架构,只要干这一行掌握的关键源码知识都会含在笔记里。
资源推荐
资源详情
资源评论



















收起资源包目录






























































共 45 条
- 1
资源评论

- 游云凌剑2019-10-28总结的还可以

张教主z
- 粉丝: 0
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 电气自动化技术专业教学团队推荐表.doc
- 2023年公共关系学网络终考题库2.doc
- 移动通信技术的发展.doc
- 计算机网络技术专业培养计划.doc
- 商业计划书(上海润金软件有限公司交易助理项目).doc
- 医学统计学第十六章--Logistic回归分析.ppt
- 基于PLC的自动摆饼机控制系统的设计及实现(顾小强).ppt
- 粤教版网络技术应用教材与教学研讨市公开课一等奖百校联赛特等奖课件.pptx
- 互联网金融个体网络借贷资金存管业务规范.docx
- 解读云计算与云数据存储发展趋势技术研究.doc
- 综合布线建设方案.doc
- 基于C51单片机的数字时钟课程设计C语言,带闹钟.doc
- 谭浩强C语言第13章.ppt
- 大学生网络利用调查报告.doc
- 2023年学员做试卷中小学教师融合教育知识网络竞赛.docx
- 互联网项目商业计划书模板.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
