QuestionQ46

VerifiedTroubleshooting and Tuning Apache Spark DataFrame API Applications.

The code block below contains an error. It is intended to set the number of partitions used for wide transformations such as join() to 32. Identify the error.

Code block:

spark.conf.set("spark.default.parallelism", "32")  
Explanation

spark.sql.shuffle.partitions controls the number of partitions used when Spark SQL shuffles data for joins and aggregations. spark.default.parallelism is a separate core Spark setting for default parallelism and does not configure SQL/DataFrame shuffle partitions.

Learn more

Community Discussion

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