当前位置:网站首页>spark中Repartition 和 Coalesce 区别
spark中Repartition 和 Coalesce 区别
2022-08-03 05:32:00 【贾斯汀玛尔斯】
关系: 两者都是用来改变 RDD 的 partition 数量的,repartition 底层调用的就是 coalesce 方法: coalesce(numPartitions, shuffle = true)
区别: repartition 一定会发生 shuffle,coalesce 根据传入的参数来判断是否发生 shuffle 一般情况下增大 rdd 的 partition 数量使用 repartition,减少 partition 数量时使用 coalesce
边栏推荐
- 【DIoU CIoU】DIoU和CIoU损失函数理解及代码实现
- CPU上下文切换详解思维导图
- nacos-2.0.3启动报错出现no datasource set的坑
- 【应届生租房】应届生如何租房以及注意事项
- 一文读懂PCB品质体系认证
- mysql的配置文件(my.ini或者 my.cnf)所在位置
- empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType),
- prometheus 监控mysql数据库
- 【设计指南】避免PCB板翘,合格的工程师都会这样设计!
- mysql or语句的优化
猜你喜欢
随机推荐
SQL——左连接(Left join)、右连接(Right join)、内连接(Inner join)
npx 有什么作用跟意义?为什么要有 npx?什么场景使用?
【云原生 · Kubernetes】Kubernetes基础环境搭建
置顶文章-
prometheus 监控mysql数据库
Servlet详解含实例
Composer require 报错 Installation failed, reverting ./composer.json and ./composer.lock to their ...
UniApp 获取当前页面标题(navigationBarTitleText)
empty() received an invalid combination of arguments - got (tuple, dtype=NoneType, device=NoneType),
快速理解JVM+GC
高密度 PCB 线路板设计中的过孔知识
cnpm的安装与使用
MySQL的触发器
【OpenStack云平台】搭建openstack云平台
PCB板上的字母代表哪些元器件?一文看全!
Chrome插件开发入门
postman配置中文
JDBC从手写连接到引用DBCP和C3P0
零代码工具拖拽流程图
MySQL的Replace用法详解