coalesce

coalesce我理解就是将多个partition合并成少量的partition。

data.coalesce(2,true)

第一个参数是partition数量

第二个参数是合并是是否进行shuffle操作。true是进行shuffle操作。false是不进行shuffle操作

原文地址:https://www.cnblogs.com/hark0623/p/4496946.html