Certified Associate Developer for Apache Spark Practice Test 65
Question 640
At Elmwood Manufacturing, when reviewing an incremental load (fictional study case R280-C128-1), a UDF calls a random API for every row, so retries and reruns yield different enrichment values. 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 unnecessary UDF expression.
- Correct the affected UDF definition and callers.
- Add expiration only for the affected keyed streaming state.
- Correct the nondeterministic enrichment stage.
Explanation
Correct Answer
D:Keep scope tied to the actual issue: A UDF calls a random API for every row, so retries and reruns yield different enrichment values. The bounded intervention is: Correct the nondeterministic enrichment stage. Confirm: Reprocessing yields a traceable stable enrichment or a documented stochastic result.
Incorrect Answers
A:Replace only the unnecessary UDF expression. The action does not preserve the identified scope boundary: Correct the nondeterministic enrichment stage.
B:Correct the affected UDF definition and callers. It is not the bounded choice for the stated condition: A UDF calls a random API for every row, so retries and reruns yield different enrichment values. The permitted change must remain: Correct the nondeterministic enrichment stage.
C:Add expiration only for the affected keyed streaming state. This does not enforce the required scope: Correct the nondeterministic enrichment stage. The specific failure is: Non-deterministic external side effects violate assumptions about stable pure row transformations.
Question 641
At Lakeside Devices, while optimizing an ETL application (fictional study case R280-C129-1), an RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. 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.
- Compute billing totals with deterministic Spark aggregations instead of accumulator updates.
- Treat broadcast metadata as immutable and rebuild/broadcast a new version when updates are required.
- Use a Spark broadcast variable for the immutable lookup where size and security permit.
- Use a versioned broadcast lookup or a broadcast join with the dimension DataFrame.
Explanation
Correct Answer
C:The observed defect follows from: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference. The appropriate correction is: Use a Spark broadcast variable for the immutable lookup where size and security permit. Confirm the result by verifying: Equivalent lookup results use less task overhead.
Incorrect Answers
A:Compute billing totals with deterministic Spark aggregations instead of accumulator updates. The option targets a different stage or condition. The relevant failure is: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference. The needed repair is: Use a Spark broadcast variable for the immutable lookup where size and security permit.
B:Treat broadcast metadata as immutable and rebuild/broadcast a new version when updates are required. That would not resolve the reported problem: An RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. The source-supported intervention is: Use a Spark broadcast variable for the immutable lookup where size and security permit.
D:Use a versioned broadcast lookup or a broadcast join with the dimension DataFrame. The option targets a different stage or condition. The relevant failure is: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference. The needed repair is: Use a Spark broadcast variable for the immutable lookup where size and security permit.
Question 642
At Bayfront Markets, during an internal acceptance test (fictional study case R280-C129-2), an RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. 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.
- Accumulators are for diagnostics and their update semantics can be affected by task execution/retries.
- Broadcast variables are read-only snapshots distributed to executors, not a shared mutable cache.
- The work issues redundant network calls instead of reusing a stable small lookup.
- Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference.
Explanation
Correct Answer
D:Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference. This accounts for the observed condition: An RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. The relevant verification is: Inspect task serialized-size warnings and executor memory before/after.
Incorrect Answers
A:Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. That explanation needs evidence of another fault. The specific mechanism here is: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference.
B:Broadcast variables are read-only snapshots distributed to executors, not a shared mutable cache. The observed failure instead follows from: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference. The alternative does not explain the same dependency.
C:The work issues redundant network calls instead of reusing a stable small lookup. That explanation needs evidence of another fault. The specific mechanism here is: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference.
Question 643
At Orion Fintech, after a routine data refresh (fictional study case R280-C129-1), an RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. 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 retry logs with accumulator and aggregate values.
- Inspect task serialized-size warnings and executor memory before/after.
- Compare broadcast version IDs across controlled executions.
- Count external calls and compare join outputs on a sample.
Explanation
Correct Answer
B:An RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. The useful diagnostic is: Inspect task serialized-size warnings and executor memory before/after. That can confirm or refute: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference.
Incorrect Answers
A:Compare task retry logs with accumulator and aggregate values. That does not establish whether the stated cause is present: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference. The diagnostic is: Inspect task serialized-size warnings and executor memory before/after.
C:Compare broadcast version IDs across controlled executions. That does not establish whether the stated cause is present: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference. The diagnostic is: Inspect task serialized-size warnings and executor memory before/after.
D:Count external calls and compare join outputs on a sample. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect task serialized-size warnings and executor memory before/after.
Question 644
At Westfield Insights, while debugging a failed notebook (fictional study case R280-C129-2), an RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. 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.
- Billable counts reconcile exactly under fault injection.
- All tasks consume a consistent approved mapping version.
- Equivalent lookup results use less task overhead.
- Enrichment yields identical values with far fewer network requests.
Explanation
Correct Answer
C:A passing check shows: Equivalent lookup results use less task overhead. This is evidence for the scoped change: Use a Spark broadcast variable for the immutable lookup where size and security permit.
Incorrect Answers
A:Billable counts reconcile exactly under fault injection. This is not the observed recovery outcome. Acceptance requires: Equivalent lookup results use less task overhead.
B:All tasks consume a consistent approved mapping version. The alternative cannot demonstrate that the issue has been corrected: An RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. The required result is: Equivalent lookup results use less task overhead.
D:Enrichment yields identical values with far fewer network requests. Implementation or a check alone is not proof of success. The measurable end state is: Equivalent lookup results use less task overhead.
Question 645
At Mapleford Engineering, during a performance incident (fictional study case R280-C129-1), an RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. 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.
- Broadcast only the approved immutable mapping.
- Remove accumulator reliance from business totals.
- Change only the lookup-version refresh process.
- Refactor only the stable reference enrichment.
Explanation
Correct Answer
A:Keep the intervention within this boundary: Broadcast only the approved immutable mapping. The reported failure mechanism is: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference.
Incorrect Answers
B:Remove accumulator reliance from business totals. The action does not preserve the identified scope boundary: Broadcast only the approved immutable mapping.
C:Change only the lookup-version refresh process. This does not enforce the required scope: Broadcast only the approved immutable mapping. The specific failure is: Closure shipping repeatedly transmits bulky read-only metadata instead of a shared broadcast reference.
D:Refactor only the stable reference enrichment. It is not the bounded choice for the stated condition: An RDD-style transformation captures a large Python dictionary in each task and increases task serialization cost. The permitted change must remain: Broadcast only the approved immutable mapping.
Question 646
At Horizon Logistics, while optimizing an ETL application (fictional study case R280-C130-1), a billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. 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.
- Treat broadcast metadata as immutable and rebuild/broadcast a new version when updates are required.
- Use a versioned broadcast lookup or a broadcast join with the dimension DataFrame.
- Aggregate bounded error counts and write invalid rows to a controlled distributed sink.
- Compute billing totals with deterministic Spark aggregations instead of accumulator updates.
Explanation
Correct Answer
D:Compute billing totals with deterministic Spark aggregations instead of accumulator updates. The technical or governance gap is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. Check the affected state using: Compare task retry logs with accumulator and aggregate values.
Incorrect Answers
A:Treat broadcast metadata as immutable and rebuild/broadcast a new version when updates are required. That would not resolve the reported problem: A billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. The source-supported intervention is: Compute billing totals with deterministic Spark aggregations instead of accumulator updates.
B:Use a versioned broadcast lookup or a broadcast join with the dimension DataFrame. The option targets a different stage or condition. The relevant failure is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. The needed repair is: Compute billing totals with deterministic Spark aggregations instead of accumulator updates.
C:Aggregate bounded error counts and write invalid rows to a controlled distributed sink. The recorded mechanism is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. The proposed action does not correct that mechanism; use: Compute billing totals with deterministic Spark aggregations instead of accumulator updates.
Question 647
At Aspen Public Services, during an internal acceptance test (fictional study case R280-C130-2), a billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. 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.
- Broadcast variables are read-only snapshots distributed to executors, not a shared mutable cache.
- Accumulators are for diagnostics and their update semantics can be affected by task execution/retries.
- The work issues redundant network calls instead of reusing a stable small lookup.
- Accumulators are unsuitable for unbounded row-level data collection.
Explanation
Correct Answer
B:A billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. The supporting root cause is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. The appropriate remedy is: Compute billing totals with deterministic Spark aggregations instead of accumulator updates.
Incorrect Answers
A:Broadcast variables are read-only snapshots distributed to executors, not a shared mutable cache. This is not the root cause established for the reported condition: A billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. The cause is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries.
C:The work issues redundant network calls instead of reusing a stable small lookup. That explanation needs evidence of another fault. The specific mechanism here is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries.
D:Accumulators are unsuitable for unbounded row-level data collection. The observed failure instead follows from: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. The alternative does not explain the same dependency.
Question 648
At Juniper Foods, after a routine data refresh (fictional study case R280-C130-1), a billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. 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 retry logs with accumulator and aggregate values.
- Compare broadcast version IDs across controlled executions.
- Count external calls and compare join outputs on a sample.
- Measure accumulator size and compare quarantined row count.
Explanation
Correct Answer
A:Compare task retry logs with accumulator and aggregate values. This gathers evidence about the stated mechanism: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. The existing symptom is: A billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries.
Incorrect Answers
B:Compare broadcast version IDs across controlled executions. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare task retry logs with accumulator and aggregate values.
C:Count external calls and compare join outputs on a sample. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare task retry logs with accumulator and aggregate values.
D:Measure accumulator size and compare quarantined row count. That does not establish whether the stated cause is present: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries. The diagnostic is: Compare task retry logs with accumulator and aggregate values.
Question 649
At Silverpeak Bioinformatics, while debugging a failed notebook (fictional study case R280-C130-2), a billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. 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.
- All tasks consume a consistent approved mapping version.
- Enrichment yields identical values with far fewer network requests.
- Diagnostics remain bounded and complete invalid records are auditable.
- Billable counts reconcile exactly under fault injection.
Explanation
Correct Answer
D:Billable counts reconcile exactly under fault injection. This is an observable state after the correction: Compute billing totals with deterministic Spark aggregations instead of accumulator updates. It confirms the original problem no longer occurs.
Incorrect Answers
A:All tasks consume a consistent approved mapping version. This is not the observed recovery outcome. Acceptance requires: Billable counts reconcile exactly under fault injection.
B:Enrichment yields identical values with far fewer network requests. This is not the observed recovery outcome. Acceptance requires: Billable counts reconcile exactly under fault injection.
C:Diagnostics remain bounded and complete invalid records are auditable. This is not the observed recovery outcome. Acceptance requires: Billable counts reconcile exactly under fault injection.
Question 650
At Willowbank Software, during a performance incident (fictional study case R280-C130-1), a billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. 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 lookup-version refresh process.
- Refactor only the stable reference enrichment.
- Remove accumulator reliance from business totals.
- Redesign only the error collection path.
Explanation
Correct Answer
C:Keep scope tied to the actual issue: A billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. The bounded intervention is: Remove accumulator reliance from business totals. Confirm: Billable counts reconcile exactly under fault injection.
Incorrect Answers
A:Change only the lookup-version refresh process. This does not enforce the required scope: Remove accumulator reliance from business totals. The specific failure is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries.
B:Refactor only the stable reference enrichment. This does not enforce the required scope: Remove accumulator reliance from business totals. The specific failure is: Accumulators are for diagnostics and their update semantics can be affected by task execution/retries.
D:Redesign only the error collection path. It is not the bounded choice for the stated condition: A billing pipeline increments an accumulator inside tasks and expects precisely-once totals despite retries. The permitted change must remain: Remove accumulator reliance from business totals.