In Apache Spark, what triggers a shuffle?
1Times asked
Aug 2026Last seen
Aug 2026First seen
💡 Model Answer
A shuffle in Spark is triggered by wide transformations that require data to be redistributed across partitions. Common examples are groupBy, reduceByKey, join, cogroup, and distinct. These operations need to bring all records with the same key to the same executor, which involves network transfer and disk I/O. Narrow transformations like map or filter do not trigger shuffles because they can be performed locally on each partition.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.
Get Assisting AI — Starts at ₹500