摘要: 一、在聚合前在map端先预聚合 使用reduceByKey/aggregateByKey代替groupByKey 二、一次处理一个分区的数据,不过要注意一个分区里的数据不要太大,不然会报oom * 使用mapPartitions代替map * 使用foreachPartitions代替foreach 阅读全文
posted @ 2021-03-31 20:32 肥仔佳文猪 阅读(214) 评论(0) 推荐(0)