Explain about mappartitions() and mappartitionswithindex()
Answer Posted / Mitan Verma
mappartitions() is a transformation in Apache Spark that creates a new RDD by re-partitioning the data across a specified number of partitions. The result RDD has no dependencies on the input RDD's partition structure. On the other hand, mappartitionsWithIndex() returns an RDD with two datasets: one containing the original data, and another containing partition indices.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers