RDD.
coalesce
Return a new RDD that is reduced into numPartitions partitions.
Examples
>>> sc.parallelize([1, 2, 3, 4, 5], 3).glom().collect() [[1], [2, 3], [4, 5]] >>> sc.parallelize([1, 2, 3, 4, 5], 3).coalesce(1).glom().collect() [[1, 2, 3, 4, 5]]
previous
pyspark.RDD.checkpoint
next
pyspark.RDD.cogroup