Certified Associate Developer for Apache Spark Practice Test 2
Question 10
At Westfield Insights, while optimizing an ETL application (fictional study case R280-C002-1), a small 40-row reference mapping is processed through an expensive distributed job that adds noticeable startup overhead. 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.
- Replace only the row-wise computational portion while preserving application side effects.
- Tune the aggregation path without discarding required group keys.
- 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
C:The relevant boundary is: Restrict the simplification to the bounded reference input, not the large fact table. The correction remains: Keep this genuinely small static mapping local or broadcast it inside an existing distributed job instead of starting an isolated cluster computation.
Incorrect Answers
A:Replace only the row-wise computational portion while preserving application side effects. This does not enforce the required scope: Restrict the simplification to the bounded reference input, not the large fact table. The specific failure is: Cluster scheduling and distributed execution overhead dominate work that fits safely in a local process.
B:Tune the aggregation path without discarding required group keys. It is not the bounded choice for the stated condition: A small 40-row reference mapping is processed through an expensive distributed job that adds noticeable startup overhead. The permitted change must remain: Restrict the simplification to the bounded reference input, not the large fact table.
D:Avoid unbounded driver transfer on the affected result only. It is not the bounded choice for the stated condition: A small 40-row reference mapping is processed through an expensive distributed job that adds noticeable startup overhead. The permitted change must remain: Restrict the simplification to the bounded reference input, not the large fact table.
Question 11
At Mapleford Engineering, after a Spark runtime upgrade (fictional study case R280-C003-1), an engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. 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.
- Express the calculation with Spark SQL or DataFrame column expressions and let executors process partitions.
- Reduce unnecessary shuffle volume with early projection/filtering and appropriate key partitioning while retaining correct grouping.
- Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting.
- Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks.
Explanation
Correct Answer
A:The observed defect follows from: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client. The appropriate correction is: Express the calculation with Spark SQL or DataFrame column expressions and let executors process partitions. Confirm the result by verifying: Work is split across executor tasks and results match the validated sequential sample.
Incorrect Answers
B:Reduce unnecessary shuffle volume with early projection/filtering and appropriate key partitioning while retaining correct grouping. That would not resolve the reported problem: An engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. The source-supported intervention is: Express the calculation with Spark SQL or DataFrame column expressions and let executors process partitions.
C:Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting. The recorded mechanism is: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client. The proposed action does not correct that mechanism; use: Express the calculation with Spark SQL or DataFrame column expressions and let executors process partitions.
D:Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks. The recorded mechanism is: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client. The proposed action does not correct that mechanism; use: Express the calculation with Spark SQL or DataFrame column expressions and let executors process partitions.
Question 12
At Horizon Logistics, when validating a daily batch (fictional study case R280-C003-2), an engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. 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.
- Wide aggregations require network shuffles and data layout was not accounted for in the distributed design.
- Driver memory is being used as a substitute for a distributed output sink.
- The program bypasses distributed DataFrame transformations and serializes all row-level work on the client.
- Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
Explanation
Correct Answer
C:The program bypasses distributed DataFrame transformations and serializes all row-level work on the client. This accounts for the observed condition: An engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. The relevant verification is: Profile driver CPU and inspect the Spark UI for lack of parallel stages.
Incorrect Answers
A:Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. That explanation needs evidence of another fault. The specific mechanism here is: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client.
B:Driver memory is being used as a substitute for a distributed output sink. The observed failure instead follows from: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client. The alternative does not explain the same dependency.
D:Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. The observed failure instead follows from: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client. The alternative does not explain the same dependency.
Question 13
At Aspen Public Services, when reviewing an incremental load (fictional study case R280-C003-1), an engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. 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 stage shuffle read/write bytes against scan and compute time.
- Inspect driver heap growth and confirm the number and size of returned rows at the action.
- Profile driver CPU and inspect the Spark UI for lack of parallel stages.
- Inspect per-task durations, input bytes and hot-key frequencies.
Explanation
Correct Answer
C:An engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. The useful diagnostic is: Profile driver CPU and inspect the Spark UI for lack of parallel stages. That can confirm or refute: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client.
Incorrect Answers
A:Compare stage shuffle read/write bytes against scan and compute time. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Profile driver CPU and inspect the Spark UI for lack of parallel stages.
B:Inspect driver heap growth and confirm the number and size of returned rows at the action. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Profile driver CPU and inspect the Spark UI for lack of parallel stages.
D:Inspect per-task durations, input bytes and hot-key frequencies. The case requires a discriminating check before any change, not the offered alternative. Use: Profile driver CPU and inspect the Spark UI for lack of parallel stages.
Question 14
At Juniper Foods, before a production rollout (fictional study case R280-C003-2), an engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. 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.
- Shuffle volume and runtime decline with identical group totals.
- Work is split across executor tasks and results match the validated sequential sample.
- The output completes without driver OOM while row counts remain correct.
- No single straggler dominates the aggregation and totals are unchanged.
Explanation
Correct Answer
B:The verification result must be: Work is split across executor tasks and results match the validated sequential sample. It is stronger evidence than merely performing: Profile driver CPU and inspect the Spark UI for lack of parallel stages.
Incorrect Answers
A:Shuffle volume and runtime decline with identical group totals. The alternative cannot demonstrate that the issue has been corrected: An engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. The required result is: Work is split across executor tasks and results match the validated sequential sample.
C:The output completes without driver OOM while row counts remain correct. Implementation or a check alone is not proof of success. The measurable end state is: Work is split across executor tasks and results match the validated sequential sample.
D:No single straggler dominates the aggregation and totals are unchanged. The alternative cannot demonstrate that the issue has been corrected: An engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. The required result is: Work is split across executor tasks and results match the validated sequential sample.
Question 15
At Silverpeak Bioinformatics, while optimizing an ETL application (fictional study case R280-C003-1), an engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. 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.
- Tune the aggregation path without discarding required group keys.
- Avoid unbounded driver transfer on the affected result only.
- Replace only the row-wise computational portion while preserving application side effects.
- Change only the skewed stage and document its special-case data contract.
Explanation
Correct Answer
C:Keep the intervention within this boundary: Replace only the row-wise computational portion while preserving application side effects. The reported failure mechanism is: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client.
Incorrect Answers
A:Tune the aggregation path without discarding required group keys. It is not the bounded choice for the stated condition: An engineer runs a sequential Python loop over millions of records on the driver although executors are mostly idle. The permitted change must remain: Replace only the row-wise computational portion while preserving application side effects.
B:Avoid unbounded driver transfer on the affected result only. This does not enforce the required scope: Replace only the row-wise computational portion while preserving application side effects. The specific failure is: The program bypasses distributed DataFrame transformations and serializes all row-level work on the client.
D:Change only the skewed stage and document its special-case data contract. The action does not preserve the identified scope boundary: Replace only the row-wise computational portion while preserving application side effects.
Question 16
At Willowbank Software, after a Spark runtime upgrade (fictional study case R280-C004-1), a cluster finishes scans quickly but spends most job time transferring grouped data over the network. 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.
- Reduce unnecessary shuffle volume with early projection/filtering and appropriate key partitioning while retaining correct grouping.
- Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting.
- 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.
Explanation
Correct Answer
A:The observed defect follows from: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. The appropriate correction is: Reduce unnecessary shuffle volume with early projection/filtering and appropriate key partitioning while retaining correct grouping. Confirm the result by verifying: Shuffle volume and runtime decline with identical group totals.
Incorrect Answers
B:Write the result from a distributed DataFrame to supported storage or aggregate to a genuinely bounded result before collecting. The recorded mechanism is: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. The proposed action does not correct that mechanism; use: Reduce unnecessary shuffle volume with early projection/filtering and appropriate key partitioning while retaining correct grouping.
C:Profile key skew and apply an appropriate skew-aware aggregation or redistribution strategy with correctness checks. The recorded mechanism is: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. The proposed action does not correct that mechanism; use: Reduce unnecessary shuffle volume with early projection/filtering and appropriate key partitioning while retaining correct grouping.
D: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: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. The needed repair is: Reduce unnecessary shuffle volume with early projection/filtering and appropriate key partitioning while retaining correct grouping.
Question 17
At Seabrook Education, when validating a daily batch (fictional study case R280-C004-2), a cluster finishes scans quickly but spends most job time transferring grouped data over the network. 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.
- Driver memory is being used as a substitute for a distributed output sink.
- Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling.
- The implementation assumes a single-process in-memory dataset instead of exploiting distributed partitions and parallel execution.
- Wide aggregations require network shuffles and data layout was not accounted for in the distributed design.
Explanation
Correct Answer
D:Investigation should distinguish this specific mechanism: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. The related symptom is: A cluster finishes scans quickly but spends most job time transferring grouped data over the network. The discriminating check is: Compare stage shuffle read/write bytes against scan and compute time.
Incorrect Answers
A:Driver memory is being used as a substitute for a distributed output sink. The observed failure instead follows from: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. The alternative does not explain the same dependency.
B:Distributed parallelism cannot eliminate a single oversized hot-key partition without special handling. That explanation needs evidence of another fault. The specific mechanism here is: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design.
C:The implementation assumes a single-process in-memory dataset instead of exploiting distributed partitions and parallel execution. That explanation needs evidence of another fault. The specific mechanism here is: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design.
Question 18
At Bluewater Energy, when reviewing an incremental load (fictional study case R280-C004-1), a cluster finishes scans quickly but spends most job time transferring grouped data over the network. 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 driver heap growth and confirm the number and size of returned rows at the action.
- Compare stage shuffle read/write bytes against scan and compute time.
- 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.
Explanation
Correct Answer
B:A cluster finishes scans quickly but spends most job time transferring grouped data over the network. The useful diagnostic is: Compare stage shuffle read/write bytes against scan and compute time. That can confirm or refute: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design.
Incorrect Answers
A:Inspect driver heap growth and confirm the number and size of returned rows at the action. The case requires a discriminating check before any change, not the offered alternative. Use: Compare stage shuffle read/write bytes against scan and compute time.
C:Inspect per-task durations, input bytes and hot-key frequencies. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare stage shuffle read/write bytes against scan and compute time.
D: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: Wide aggregations require network shuffles and data layout was not accounted for in the distributed design. The diagnostic is: Compare stage shuffle read/write bytes against scan and compute time.
Question 19
At Meridian Commerce, before a production rollout (fictional study case R280-C004-2), a cluster finishes scans quickly but spends most job time transferring grouped data over the network. 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.
- Shuffle volume and runtime decline with identical group totals.
- 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.
Explanation
Correct Answer
B:The verification result must be: Shuffle volume and runtime decline with identical group totals. It is stronger evidence than merely performing: Compare stage shuffle read/write bytes against scan and compute time.
Incorrect Answers
A:The output completes without driver OOM while row counts remain correct. This is not the observed recovery outcome. Acceptance requires: Shuffle volume and runtime decline with identical group totals.
C:No single straggler dominates the aggregation and totals are unchanged. The alternative cannot demonstrate that the issue has been corrected: A cluster finishes scans quickly but spends most job time transferring grouped data over the network. The required result is: Shuffle volume and runtime decline with identical group totals.
D: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: Shuffle volume and runtime decline with identical group totals.
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.