在使用中一直知其然不知其所以然的地使用RDD.cache(),系统的学习之后发现还有一个与cache功能类似看起来冗余的persist 点进去一探究竟之后发现cache()是persist()的特例,persist可以指定一个StorageLevel.StorageLevel的列表可以在StorageLevel 伴生单例对象中找到: cache的源码: /** Persist this RDD with the default storage level (`MEMORY_ONLY`). */…
问题:cache 与 checkpoint 的区别? 关于这个问题,Tathagata Das 有一段回答: There is a significant difference between cache and checkpoint. Cache materializes the RDD and keeps it in memory and/or disk(其实只有 memory). But the lineage(也就是 computing chain) of RDD (that is, s…
1. 广播变量 1.1 补充知识(来源:https://blog.csdn.net/huashetianzu/article/details/7821674) 之所以存在reduce side join,是因为在map阶段不能获取所有需要的join字段,即:同一个key对应的字段可能位于不同map中.Reduce side join是非常低效的,因为shuffle阶段要进行大量的数据传输.Map side join是针对以下场景进行的优化:两个待连接表中,有一个表非常大,而另一个表非常小,以至…