Certified Associate Developer for Apache Spark Practice Test 3
Question 20
At Copperline Finance, while optimizing an ETL application (fictional study case R280-C004-1), a cluster finishes scans quickly but spends most job time transferring grouped data over the network. 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.
- Avoid unbounded driver transfer on the affected result only.
- Tune the aggregation path without discarding required group keys.
- Change only the skewed stage and document its special-case data contract.
- Keep the migration limited to the archive transformation and its output contract.
Explanation
Correct Answer
B:Keep scope tied to the actual issue: A cluster finishes scans quickly but spends most job time transferring grouped data over the network. The bounded intervention is: Tune the aggregation path without discarding required group keys. Confirm: Shuffle volume and runtime decline with identical group totals.
Incorrect Answers
A:Avoid unbounded driver transfer on the affected result only. The action does not preserve the identified scope boundary: Tune the aggregation path without discarding required group keys.
C:Change only the skewed stage and document its special-case data contract. It is not the bounded choice for the stated condition: A cluster finishes scans quickly but spends most job time transferring grouped data over the network. The permitted change must remain: Tune the aggregation path without discarding required group keys.
D:Keep the migration limited to the archive transformation and its output contract. This does not enforce the required scope: Tune the aggregation path without discarding required group keys. The specific failure is: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design.
Question 21
At Pinecrest Media, after a Spark runtime upgrade (fictional study case R280-C005-1), a transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error. 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.
- Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
- Use Spark DataFrame processing across a suitably sized cluster, keeping transformations distributed and materializing only bounded aggregates.
- Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting.
- Keep this genuinely small static mapping local or broadcast it inside an existing distributed job instead of starting an isolated cluster computation.
Explanation
Correct Answer
C:Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting. This addresses the documented mechanism: Driver memory is being used as a substitute for a distributed output sink. Recovery is demonstrated when: The output completes without driver OOM while row counts remain correct.
Incorrect Answers
A:Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks. The option targets a different stage or condition. The relevant failure is: Driver memory is being used as a substitute for a distributed output sink. The needed repair is: Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting.
B:Use Spark DataFrame processing across a suitably sized cluster, keeping transformations distributed and materializing only bounded aggregates. The option targets a different stage or condition. The relevant failure is: Driver memory is being used as a substitute for a distributed output sink. The needed repair is: Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting.
D:Keep this genuinely small static mapping local or broadcast it inside an existing distributed job instead of starting an isolated cluster computation. The option targets a different stage or condition. The relevant failure is: Driver memory is being used as a substitute for a distributed output sink. The needed repair is: Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting.
Question 22
At Ironlake Networks, when validating a daily batch (fictional study case R280-C005-2), a transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error. 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.
- Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
- Driver memory is being used as a substitute for a distributed output sink.
- The implementation assumes a single-process in-memory dataset instead of exploiting distributed partitions and parallel execution.
- Cluster scheduling and distributed execution overhead dominate work that fits safely in a local process.
Explanation
Correct Answer
B:Investigation should distinguish this specific mechanism: Driver memory is being used as a substitute for a distributed output sink. The related symptom is: A transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error. The discriminating check is: Inspect driver heap growth and confirm the number and size of returned rows at the action.
Incorrect Answers
A:Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The observed failure instead follows from: Driver memory is being used as a substitute for a distributed output sink. The alternative does not explain the same dependency.
C:The implementation assumes a single-process in-memory dataset instead of exploiting distributed partitions and parallel execution. The observed failure instead follows from: Driver memory is being used as a substitute for a distributed output sink. The alternative does not explain the same dependency.
D:Cluster scheduling and distributed execution overhead dominate work that fits safely in a local process. This is not the root cause established for the reported condition: A transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error. The cause is: Driver memory is being used as a substitute for a distributed output sink.
Question 23
At Valleywide Travel, when reviewing an incremental load (fictional study case R280-C005-1), a transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error. 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.
- Inspect per-task durations, input bytes and hot-key frequencies.
- Compare input volume and host memory with a small partitioned trial and inspect Spark task distribution.
- Measure startup latency and input size versus useful computation time.
- Inspect driver heap growth and confirm the number and size of returned rows at the action.
Explanation
Correct Answer
D:Diagnose the affected path with: Inspect driver heap growth and confirm the number and size of returned rows at the action. This tests the case-specific cause: Driver memory is being used as a substitute for a distributed output sink.
Incorrect Answers
A:Inspect per-task durations, input bytes and hot-key frequencies. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect driver heap growth and confirm the number and size of returned rows at the action.
B:Compare input volume and host memory with a small partitioned trial and inspect Spark task distribution. That does not establish whether the stated cause is present: Driver memory is being used as a substitute for a distributed output sink. The diagnostic is: Inspect driver heap growth and confirm the number and size of returned rows at the action.
C:Measure startup latency and input size versus useful computation time. That does not establish whether the stated cause is present: Driver memory is being used as a substitute for a distributed output sink. The diagnostic is: Inspect driver heap growth and confirm the number and size of returned rows at the action.
Question 24
At Harbor Data Labs, before a production rollout (fictional study case R280-C005-2), a transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error. 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.
- The output completes without driver OOM while row counts remain correct.
- No single straggler dominates the aggregation and totals are unchanged.
- The complete archive is processed without collecting raw records to the driver and the aggregate totals reconcile.
- The same 40 mappings are produced with lower latency and without unnecessary job startup.
Explanation
Correct Answer
A:The verification result must be: The output completes without driver OOM while row counts remain correct. It is stronger evidence than merely performing: Inspect driver heap growth and confirm the number and size of returned rows at the action.
Incorrect Answers
B:No single straggler dominates the aggregation and totals are unchanged. This is not the observed recovery outcome. Acceptance requires: The output completes without driver OOM while row counts remain correct.
C:The complete archive is processed without collecting raw records to the driver and the aggregate totals reconcile. Implementation or a check alone is not proof of success. The measurable end state is: The output completes without driver OOM while row counts remain correct.
D:The same 40 mappings are produced with lower latency and without unnecessary job startup. This is not the observed recovery outcome. Acceptance requires: The output completes without driver OOM while row counts remain correct.
Question 25
At Oakline Transportation, while optimizing an ETL application (fictional study case R280-C005-1), a transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error. 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.
- Change only the skewed stage and document its special-case data contract.
- Keep the migration limited to the archive transformation and its output contract.
- Restrict the simplification to the bounded reference input, not the large fact table.
- Avoid unbounded driver transfer on the affected result only.
Explanation
Correct Answer
D:The approved limit is: Avoid unbounded driver transfer on the affected result only. It avoids applying the corrective step beyond the stated failure: A transformation finishes on executors, then `collect()` pulls millions of rows into a constrained driver and triggers an out-of-memory error.
Incorrect Answers
A:Change only the skewed stage and document its special-case data contract. This does not enforce the required scope: Avoid unbounded driver transfer on the affected result only. The specific failure is: Driver memory is being used as a substitute for a distributed output sink.
B:Keep the migration limited to the archive transformation and its output contract. This does not enforce the required scope: Avoid unbounded driver transfer on the affected result only. The specific failure is: Driver memory is being used as a substitute for a distributed output sink.
C:Restrict the simplification to the bounded reference input, not the large fact table. This does not enforce the required scope: Avoid unbounded driver transfer on the affected result only. The specific failure is: Driver memory is being used as a substitute for a distributed output sink.
Question 26
At Rosehill Diagnostics, after a Spark runtime upgrade (fictional study case R280-C006-1), doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. 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 Spark DataFrame processing across a suitably sized cluster, keeping transformations distributed and materializing only bounded aggregates.
- Keep this genuinely small static mapping local or broadcast it inside an existing distributed job instead of starting an isolated cluster computation.
- Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
- Express the calculation with Spark SQL or DataFrame column expressions and let executors process partitions.
Explanation
Correct Answer
C:Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks. The technical or governance gap is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. Check the affected state using: Inspect per-task durations, input bytes and hot-key frequencies.
Incorrect Answers
A:Use Spark DataFrame processing across a suitably sized cluster, keeping transformations distributed and materializing only bounded aggregates. The option targets a different stage or condition. The relevant failure is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The needed repair is: Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
B:Keep this genuinely small static mapping local or broadcast it inside an existing distributed job instead of starting an isolated cluster computation. That would not resolve the reported problem: Doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. The source-supported intervention is: Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
D:Express the calculation with Spark SQL or DataFrame column expressions and let executors process partitions. The recorded mechanism is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The proposed action does not correct that mechanism; use: Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
Question 27
At Redwood Transit, when validating a daily batch (fictional study case R280-C006-2), doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. 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.
- The implementation assumes a single-process in-memory dataset instead of exploiting distributed partitions and parallel execution.
- Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
- Cluster scheduling and distributed execution overhead dominate work that fits safely in a local process.
- The program bypasses distributed DataFrame transformations and serializes all row-level work on the client.
Explanation
Correct Answer
B:Doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. The supporting root cause is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The appropriate remedy is: Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
Incorrect Answers
A:The implementation assumes a single-process in-memory dataset instead of exploiting distributed partitions and parallel execution. This is not the root cause established for the reported condition: Doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. The cause is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
C:Cluster scheduling and distributed execution overhead dominate work that fits safely in a local process. That explanation needs evidence of another fault. The specific mechanism here is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
D:The program bypasses distributed DataFrame transformations and serializes all row-level work on the client. This is not the root cause established for the reported condition: Doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. The cause is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
Question 28
At Meadowvale Robotics, when reviewing an incremental load (fictional study case R280-C006-1), doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. 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 input volume and host memory with a small partitioned trial and inspect Spark task distribution.
- Measure startup latency and input size versus useful computation time.
- Inspect per-task durations, input bytes and hot-key frequencies.
- Profile driver CPU and inspect the Spark UI for lack of parallel stages.
Explanation
Correct Answer
C:Inspect per-task durations, input bytes and hot-key frequencies. This gathers evidence about the stated mechanism: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The existing symptom is: Doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows.
Incorrect Answers
A:Compare input volume and host memory with a small partitioned trial and inspect Spark task distribution. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect per-task durations, input bytes and hot-key frequencies.
B:Measure startup latency and input size versus useful computation time. That does not establish whether the stated cause is present: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The diagnostic is: Inspect per-task durations, input bytes and hot-key frequencies.
D:Profile driver CPU and inspect the Spark UI for lack of parallel stages. That does not establish whether the stated cause is present: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The diagnostic is: Inspect per-task durations, input bytes and hot-key frequencies.
Question 29
At Northridge Retail, before a production rollout (fictional study case R280-C006-2), doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. 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.
- The complete archive is processed without collecting raw records to the driver and the aggregate totals reconcile.
- The same 40 mappings are produced with lower latency and without unnecessary job startup.
- No single straggler dominates the aggregation and totals are unchanged.
- Work is split across executor tasks and results match the validated sequential sample.
Explanation
Correct Answer
C:A passing check shows: No single straggler dominates the aggregation and totals are unchanged. This is evidence for the scoped change: Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
Incorrect Answers
A:The complete archive is processed without collecting raw records to the driver and the aggregate totals reconcile. This is not the observed recovery outcome. Acceptance requires: No single straggler dominates the aggregation and totals are unchanged.
B:The same 40 mappings are produced with lower latency and without unnecessary job startup. Implementation or a check alone is not proof of success. The measurable end state is: No single straggler dominates the aggregation and totals are unchanged.
D:Work is split across executor tasks and results match the validated sequential sample. Implementation or a check alone is not proof of success. The measurable end state is: No single straggler dominates the aggregation and totals are unchanged.
Question 30
At Northstar Payments, while optimizing an ETL application (fictional study case R280-C006-1), doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. 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.
- Keep the migration limited to the archive transformation and its output contract.
- Change only the skewed stage and document its special-case data contract.
- Restrict the simplification to the bounded reference input, not the large fact table.
- Replace only the row-wise computational portion while preserving application side effects.
Explanation
Correct Answer
B:Change only the skewed stage and document its special-case data contract. This limits the change while addressing: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The expected outcome is: No single straggler dominates the aggregation and totals are unchanged.
Incorrect Answers
A:Keep the migration limited to the archive transformation and its output contract. This does not enforce the required scope: Change only the skewed stage and document its special-case data contract. The specific failure is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
C:Restrict the simplification to the bounded reference input, not the large fact table. This does not enforce the required scope: Change only the skewed stage and document its special-case data contract. The specific failure is: Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
D:Replace only the row-wise computational portion while preserving application side effects. It is not the bounded choice for the stated condition: Doubling worker nodes barely improves a group-by because one product identifier owns most of the input rows. The permitted change must remain: Change only the skewed stage and document its special-case data contract.