CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice question 8 of 25
A data engineer is running a Spark job to process a dataset of 1 TB stored in distributed storage. The cluster has 10 nodes, each with 16 CPUs. Spark…
Choose your answer, then check it against the explanation and the full breakdown below.
Question breakdown
Key idea: Size partitions from the data volume (about 128 MB each) so there are many more tasks than cores, keeping every core busy while each task stays manageable.
How to reach the answer
- The symptoms are few active tasks and fewer tasks than the 160 available cores, which points to too few partitions for the cluster.
- A count tied only to hardware (160 or 10 partitions) ignores the 1 TB size and produces multi-GB partitions.
- A fixed value such as 200 also ignores data size, giving roughly 5 GB per partition.
- 1 TB divided by 128 MB gives about 8,192 partitions, which run in many waves across 160 cores at a safe per-task size.
Each option
Common trap: Option A sounds like a natural match of one task per core, but it ignores how much data each task would have to process.
In practice: Engineers tune spark.sql.files.maxPartitionBytes, spark.sql.shuffle.partitions, or repartition() based on data volume, and rely on AQE to coalesce small shuffle partitions.
Remember: Derive the partition count from data size divided by a target partition size, not from core or node counts alone.
Drafted with AI assistance and checked against the answer key.
Keep practicing
Take the free CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice questions
- Question 1You have: DataFrame A: 128 GB of transactions DataFrame B: 1 GB user lookup table Which s…
- Question 2A Spark DataFrame df is cached using the MEMORY_AND_DISK storage level, but the DataFrame…
- Question 344 of 55. A data engineer is working on a real-time analytics pipeline using Spark Struct…
- Question 7A developer wants to test Spark Connect with an existing Spark application. What are the …
- Question 10A data engineer is building a Structured Streaming pipeline and wants the pipeline to rec…
- Question 11Given a DataFrame df that has 10 partitions, after running the code: result = df.coalesce…
