What is a glom?. How it is different from mapPartitions?

后端 未结 3 1254
慢半拍i
慢半拍i 2021-01-31 22:31

I\'ve come across the glom() method on RDD. As per the documentation

Return an RDD created by coalescing all elements within each partition

3条回答
  •  我在风中等你
    2021-01-31 23:03

    glom() transforms each partition into a tuple (immutabe list) of elements. It creates an RDD of tuples. One tuple per partition.

提交回复
热议问题