QuestionQ35

VerifiedTroubleshooting and Tuning Apache Spark DataFrame API Applications.

Which statement describes the difference between DataFrame.repartition(n) and DataFrame.coalesce(n)?

Explanation

DataFrame.repartition(n) redistributes data through a shuffle into the target number of partitions, generally balancing the distribution. DataFrame.coalesce(n) reduces existing partitions without a shuffle, making it faster but potentially producing uneven partition sizes.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!