Certified Associate Developer for Apache Spark Practice Test 13
Question 120
At Harbor Data Labs, while reconciling a reporting dataset (fictional study case R280-C024-1), the scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The change owner wants to avoid damaging unrelated tables, jobs or access. Which change boundary BEST limits the correction to the affected Spark workload? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Update performance diagnosis, not the logical query output.
- Limit recovery handling to failed partitions and idempotent sinks.
- Change the grouping data path, not unrelated narrow transformations.
- Address the affected shuffle and executor health, not the source schema.
Explanation
Correct Answer
D:Keep the intervention within this boundary: Address the affected shuffle and executor health, not the source schema. The reported failure mechanism is: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue.
Incorrect Answers
A:Update performance diagnosis, not the logical query output. The action does not preserve the identified scope boundary: Address the affected shuffle and executor health, not the source schema.
B:Limit recovery handling to failed partitions and idempotent sinks. The action does not preserve the identified scope boundary: Address the affected shuffle and executor health, not the source schema.
C:Change the grouping data path, not unrelated narrow transformations. It is not the bounded choice for the stated condition: The scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The permitted change must remain: Address the affected shuffle and executor health, not the source schema.
Question 121
At Oakline Transportation, after a Spark runtime upgrade (fictional study case R280-C025-1), a 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. Which corrective Spark operation or design change BEST addresses the reported failure? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost.
- Use key salting or skew-aware processing where semantic correctness permits, with recombination to preserve totals.
- Remove the redundant repartition and retain source parallelism for the narrow projection.
- Coalesce or repartition appropriately before writing after checking downstream parallelism and data size.
Explanation
Correct Answer
D:The observed defect follows from: Output file count follows task/partition structure rather than the actual dataset size. The appropriate correction is: Coalesce or repartition appropriately before writing after checking downstream parallelism and data size. Confirm the result by verifying: A manageable number of files is written with unchanged rows and schema.
Incorrect Answers
A:Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost. That would not resolve the reported problem: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The source-supported intervention is: Coalesce or repartition appropriately before writing after checking downstream parallelism and data size.
B:Use key salting or skew-aware processing where semantic correctness permits, with recombination to preserve totals. The recorded mechanism is: Output file count follows task/partition structure rather than the actual dataset size. The proposed action does not correct that mechanism; use: Coalesce or repartition appropriately before writing after checking downstream parallelism and data size.
C:Remove the redundant repartition and retain source parallelism for the narrow projection. The option targets a different stage or condition. The relevant failure is: Output file count follows task/partition structure rather than the actual dataset size. The needed repair is: Coalesce or repartition appropriately before writing after checking downstream parallelism and data size.
Question 122
At Rosehill Diagnostics, when validating a daily batch (fictional study case R280-C025-2), a 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The engineer wants to distinguish the mechanism before changing code. Which underlying Spark mechanism BEST explains the observed symptom? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Output file count follows task/partition structure rather than the actual dataset size.
- `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.
- Hash partitioning groups identical keys and a highly skewed key overwhelms a single partition.
- Repartitioning introduces an extra shuffle without a downstream distribution requirement.
Explanation
Correct Answer
A:The failure is explained by: Output file count follows task/partition structure rather than the actual dataset size. A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. Correcting it would require: Coalesce or repartition appropriately before writing after checking downstream parallelism and data size.
Incorrect Answers
B:`coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism. This is not the root cause established for the reported condition: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The cause is: Output file count follows task/partition structure rather than the actual dataset size.
C:Hash partitioning groups identical keys and a highly skewed key overwhelms a single partition. That explanation needs evidence of another fault. The specific mechanism here is: Output file count follows task/partition structure rather than the actual dataset size.
D:Repartitioning introduces an extra shuffle without a downstream distribution requirement. This is not the root cause established for the reported condition: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The cause is: Output file count follows task/partition structure rather than the actual dataset size.
Question 123
At Redwood Transit, when reviewing an incremental load (fictional study case R280-C025-1), a 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. Competing explanations are being considered; choose the most discriminating check. Which evidence check BEST distinguishes this cause from a different Spark problem? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Compare task input sizes and stage timing before and after partition adjustment.
- Profile key frequencies and per-partition bytes in the shuffle.
- Compare physical plans for Exchange nodes and output parity.
- Measure result bytes, partition count and per-file sizes before the write.
Explanation
Correct Answer
D:Measure result bytes, partition count and per-file sizes before the write. This gathers evidence about the stated mechanism: Output file count follows task/partition structure rather than the actual dataset size. The existing symptom is: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions.
Incorrect Answers
A:Compare task input sizes and stage timing before and after partition adjustment. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Measure result bytes, partition count and per-file sizes before the write.
B:Profile key frequencies and per-partition bytes in the shuffle. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Measure result bytes, partition count and per-file sizes before the write.
C:Compare physical plans for Exchange nodes and output parity. The case requires a discriminating check before any change, not the offered alternative. Use: Measure result bytes, partition count and per-file sizes before the write.
Question 124
At Meadowvale Robotics, before a production rollout (fictional study case R280-C025-2), a 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. A proposed fix has been applied; its result still needs validation. Which measurable outcome BEST confirms the fix works without violating the data contract? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Tasks share the input more evenly and runtime meets the target.
- No partition dominates processing and per-country totals remain exact.
- A manageable number of files is written with unchanged rows and schema.
- The unnecessary shuffle disappears with identical projected rows.
Explanation
Correct Answer
C:A manageable number of files is written with unchanged rows and schema. This demonstrates the intended effect of: Coalesce or repartition appropriately before writing after checking downstream parallelism and data size. The prior failure was: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions.
Incorrect Answers
A:Tasks share the input more evenly and runtime meets the target. Implementation or a check alone is not proof of success. The measurable end state is: A manageable number of files is written with unchanged rows and schema.
B:No partition dominates processing and per-country totals remain exact. This is not the observed recovery outcome. Acceptance requires: A manageable number of files is written with unchanged rows and schema.
D:The unnecessary shuffle disappears with identical projected rows. This is not the observed recovery outcome. Acceptance requires: A manageable number of files is written with unchanged rows and schema.
Question 125
At Northridge Retail, while optimizing an ETL application (fictional study case R280-C025-1), a 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The change owner wants to avoid damaging unrelated tables, jobs or access. Which change boundary BEST limits the correction to the affected Spark workload? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Repartition the bottleneck stage, not all upstream sources.
- Adjust output partition count only for the small result.
- Apply skew mitigation to that keyed operation only.
- Remove only the gratuitous repartition step.
Explanation
Correct Answer
B:Keep scope tied to the actual issue: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The bounded intervention is: Adjust output partition count only for the small result. Confirm: A manageable number of files is written with unchanged rows and schema.
Incorrect Answers
A:Repartition the bottleneck stage, not all upstream sources. It is not the bounded choice for the stated condition: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The permitted change must remain: Adjust output partition count only for the small result.
C:Apply skew mitigation to that keyed operation only. It is not the bounded choice for the stated condition: A 20 MB result produces 800 Parquet part files because it inherits excessive shuffle partitions. The permitted change must remain: Adjust output partition count only for the small result.
D:Remove only the gratuitous repartition step. The action does not preserve the identified scope boundary: Adjust output partition count only for the small result.
Question 126
At Northstar Payments, after a Spark runtime upgrade (fictional study case R280-C026-1), a large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. Which corrective Spark operation or design change BEST addresses the reported failure? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Use key salting or skew-aware processing where semantic correctness permits, with recombination to preserve totals.
- Remove the redundant repartition and retain source parallelism for the narrow projection.
- Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost.
- Use the writer's `.partitionBy('region')` with valid save mode and verify output layout.
Explanation
Correct Answer
C:Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost. The technical or governance gap is: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism. Check the affected state using: Compare task input sizes and stage timing before and after partition adjustment.
Incorrect Answers
A:Use key salting or skew-aware processing where semantic correctness permits, with recombination to preserve totals. That would not resolve the reported problem: A large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. The source-supported intervention is: Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost.
B:Remove the redundant repartition and retain source parallelism for the narrow projection. The option targets a different stage or condition. The relevant failure is: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism. The needed repair is: Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost.
D:Use the writer's `.partitionBy('region')` with valid save mode and verify output layout. That would not resolve the reported problem: A large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. The source-supported intervention is: Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost.
Question 127
At Cloudhaven Apps, when validating a daily batch (fictional study case R280-C026-2), a large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. The engineer wants to distinguish the mechanism before changing code. Which underlying Spark mechanism BEST explains the observed symptom? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.
- Hash partitioning groups identical keys and a highly skewed key overwhelms a single partition.
- Repartitioning introduces an extra shuffle without a downstream distribution requirement.
- DataFrame partitioning and on-disk directory partitioning are different controls; `partitionBy` was not set for the write.
Explanation
Correct Answer
A:Investigation should distinguish this specific mechanism: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism. The related symptom is: A large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. The discriminating check is: Compare task input sizes and stage timing before and after partition adjustment.
Incorrect Answers
B:Hash partitioning groups identical keys and a highly skewed key overwhelms a single partition. That explanation needs evidence of another fault. The specific mechanism here is: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.
C:Repartitioning introduces an extra shuffle without a downstream distribution requirement. This is not the root cause established for the reported condition: A large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. The cause is: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.
D:DataFrame partitioning and on-disk directory partitioning are different controls; `partitionBy` was not set for the write. That explanation needs evidence of another fault. The specific mechanism here is: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.
Question 128
At Bayshore Healthcare, when reviewing an incremental load (fictional study case R280-C026-1), a large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. Competing explanations are being considered; choose the most discriminating check. Which evidence check BEST distinguishes this cause from a different Spark problem? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Profile key frequencies and per-partition bytes in the shuffle.
- Compare task input sizes and stage timing before and after partition adjustment.
- Compare physical plans for Exchange nodes and output parity.
- Inspect resulting directory structure and schema after reading the output.
Explanation
Correct Answer
B:Diagnose the affected path with: Compare task input sizes and stage timing before and after partition adjustment. This tests the case-specific cause: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.
Incorrect Answers
A:Profile key frequencies and per-partition bytes in the shuffle. That does not establish whether the stated cause is present: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism. The diagnostic is: Compare task input sizes and stage timing before and after partition adjustment.
C:Compare physical plans for Exchange nodes and output parity. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare task input sizes and stage timing before and after partition adjustment.
D:Inspect resulting directory structure and schema after reading the output. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare task input sizes and stage timing before and after partition adjustment.
Question 129
At Stonebridge Research, before a production rollout (fictional study case R280-C026-2), a large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. A proposed fix has been applied; its result still needs validation. Which measurable outcome BEST confirms the fix works without violating the data contract? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- No partition dominates processing and per-country totals remain exact.
- The unnecessary shuffle disappears with identical projected rows.
- Files are placed under region directories and all rows are preserved.
- Tasks share the input more evenly and runtime meets the target.
Explanation
Correct Answer
D:Tasks share the input more evenly and runtime meets the target. This is an observable state after the correction: Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost. It confirms the original problem no longer occurs.
Incorrect Answers
A:No partition dominates processing and per-country totals remain exact. This is not the observed recovery outcome. Acceptance requires: Tasks share the input more evenly and runtime meets the target.
B:The unnecessary shuffle disappears with identical projected rows. This is not the observed recovery outcome. Acceptance requires: Tasks share the input more evenly and runtime meets the target.
C:Files are placed under region directories and all rows are preserved. Implementation or a check alone is not proof of success. The measurable end state is: Tasks share the input more evenly and runtime meets the target.
Question 130
At Cedarline Telecommunications, while optimizing an ETL application (fictional study case R280-C026-1), a large dataset is reduced from hundreds of partitions to two without a shuffle, leaving one expensive serial task. The change owner wants to avoid damaging unrelated tables, jobs or access. Which change boundary BEST limits the correction to the affected Spark workload? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Apply skew mitigation to that keyed operation only.
- Remove only the gratuitous repartition step.
- Change output layout only for this dataset.
- Repartition the bottleneck stage, not all upstream sources.
Explanation
Correct Answer
D:The relevant boundary is: Repartition the bottleneck stage, not all upstream sources. The correction remains: Use a suitable shuffle-enabled `repartition` when redistributing large data evenly is worth its cost.
Incorrect Answers
A:Apply skew mitigation to that keyed operation only. The action does not preserve the identified scope boundary: Repartition the bottleneck stage, not all upstream sources.
B:Remove only the gratuitous repartition step. This does not enforce the required scope: Repartition the bottleneck stage, not all upstream sources. The specific failure is: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.
C:Change output layout only for this dataset. This does not enforce the required scope: Repartition the bottleneck stage, not all upstream sources. The specific failure is: `coalesce` with a narrow dependency can consolidate work unevenly and reduce available parallelism.