Certified Associate Developer for Apache Spark Practice Test 10
Question 90
At Rosehill Diagnostics, while optimizing an ETL application (fictional study case R280-C018-1), a reporting query serves yesterday's rows after the upstream table was rewritten because an earlier DataFrame remained cached. 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.
- Constrain changes to session lifecycle for this application.
- Persist only the repeatedly reused intermediate dataset.
- Invalidate only affected cached relations, preserving unrelated caches.
- Retune only the oversized cached intermediate.
Explanation
Correct Answer
C:Keep scope tied to the actual issue: A reporting query serves yesterday's rows after the upstream table was rewritten because an earlier DataFrame remained cached. The bounded intervention is: Invalidate only affected cached relations, preserving unrelated caches. Confirm: Fresh source rows appear after invalidation, with downstream counts reconciled.
Incorrect Answers
A:Constrain changes to session lifecycle for this application. It is not the bounded choice for the stated condition: A reporting query serves yesterday's rows after the upstream table was rewritten because an earlier DataFrame remained cached. The permitted change must remain: Invalidate only affected cached relations, preserving unrelated caches.
B:Persist only the repeatedly reused intermediate dataset. This does not enforce the required scope: Invalidate only affected cached relations, preserving unrelated caches. The specific failure is: Cache lifecycle was not invalidated when source data changed and the relation continues serving persisted partitions.
D:Retune only the oversized cached intermediate. The action does not preserve the identified scope boundary: Invalidate only affected cached relations, preserving unrelated caches.
Question 91
At Redwood Transit, after a routine data refresh (fictional study case R280-C019-1), a pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. 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.
- Let the scheduler retry within configured policies and investigate recurring task failures separately.
- Account for the shuffle in sizing and reduce transferred data before grouping where valid.
- Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
- Consolidate required outputs or persist the shared intermediate when multiple actions justify caching.
Explanation
Correct Answer
C:Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly. This addresses the documented mechanism: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. Recovery is demonstrated when: The runbook identifies the actual stage and job boundaries for the pipeline.
Incorrect Answers
A:Let the scheduler retry within configured policies and investigate recurring task failures separately. The option targets a different stage or condition. The relevant failure is: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The needed repair is: Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
B:Account for the shuffle in sizing and reduce transferred data before grouping where valid. The option targets a different stage or condition. The relevant failure is: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The needed repair is: Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
D:Consolidate required outputs or persist the shared intermediate when multiple actions justify caching. That would not resolve the reported problem: A pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. The source-supported intervention is: Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
Question 92
At Meadowvale Robotics, while debugging a failed notebook (fictional study case R280-C019-2), a pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. 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.
- Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
- Stages are derived from shuffle and execution boundaries rather than one-to-one source statements.
- Keyed grouping redistributes records between partitions, introducing a wide shuffle dependency and stage boundary.
- Each action can initiate execution of lazy transformations; no persistence or materialized reuse was configured.
Explanation
Correct Answer
B:A pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. The supporting root cause is: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The appropriate remedy is: Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
Incorrect Answers
A:Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. The observed failure instead follows from: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The alternative does not explain the same dependency.
C:Keyed grouping redistributes records between partitions, introducing a wide shuffle dependency and stage boundary. That explanation needs evidence of another fault. The specific mechanism here is: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements.
D:Each action can initiate execution of lazy transformations; no persistence or materialized reuse was configured. The observed failure instead follows from: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The alternative does not explain the same dependency.
Question 93
At Northridge Retail, during a performance incident (fictional study case R280-C019-1), a pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. 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 task attempt numbers and successful partition completions by stage.
- Inspect `Exchange` in the physical plan and per-stage shuffle metrics.
- Compare Exchange operators and DAG stage dependencies with the UI.
- Inspect Spark UI job history and repeated source scans for each action.
Explanation
Correct Answer
C:A pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. The useful diagnostic is: Compare Exchange operators and DAG stage dependencies with the UI. That can confirm or refute: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements.
Incorrect Answers
A:Inspect task attempt numbers and successful partition completions by stage. That does not establish whether the stated cause is present: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The diagnostic is: Compare Exchange operators and DAG stage dependencies with the UI.
B:Inspect `Exchange` in the physical plan and per-stage shuffle metrics. That does not establish whether the stated cause is present: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The diagnostic is: Compare Exchange operators and DAG stage dependencies with the UI.
D:Inspect Spark UI job history and repeated source scans for each action. The case requires a discriminating check before any change, not the offered alternative. Use: Compare Exchange operators and DAG stage dependencies with the UI.
Question 94
At Northstar Payments, during a distributed-job recovery test (fictional study case R280-C019-2), a pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. 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 job finishes with one logical output and no duplicated external side effects.
- The stage plan reflects real network transfer and optimized grouping produces correct aggregates.
- The runbook identifies the actual stage and job boundaries for the pipeline.
- Repeated work is reduced while all requested results remain correct.
Explanation
Correct Answer
C:A passing check shows: The runbook identifies the actual stage and job boundaries for the pipeline. This is evidence for the scoped change: Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
Incorrect Answers
A:The job finishes with one logical output and no duplicated external side effects. The alternative cannot demonstrate that the issue has been corrected: A pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. The required result is: The runbook identifies the actual stage and job boundaries for the pipeline.
B:The stage plan reflects real network transfer and optimized grouping produces correct aggregates. The alternative cannot demonstrate that the issue has been corrected: A pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. The required result is: The runbook identifies the actual stage and job boundaries for the pipeline.
D:Repeated work is reduced while all requested results remain correct. Implementation or a check alone is not proof of success. The measurable end state is: The runbook identifies the actual stage and job boundaries for the pipeline.
Question 95
At Cloudhaven Apps, while reconciling a reporting dataset (fictional study case R280-C019-1), a pipeline includes map, filter, groupBy and join operations but monitoring assumes every API call creates one Spark stage. 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.
- Optimize the shared lineage and its actions only.
Explanation
Correct Answer
A:The relevant boundary is: Update performance diagnosis, not the logical query output. The correction remains: Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
Incorrect Answers
B:Limit recovery handling to failed partitions and idempotent sinks. The action does not preserve the identified scope boundary: Update performance diagnosis, not the logical query output.
C:Change the grouping data path, not unrelated narrow transformations. This does not enforce the required scope: Update performance diagnosis, not the logical query output. The specific failure is: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements.
D:Optimize the shared lineage and its actions only. This does not enforce the required scope: Update performance diagnosis, not the logical query output. The specific failure is: Stages are derived from shuffle and execution boundaries rather than one-to-one source statements.
Question 96
At Bayshore Healthcare, after a routine data refresh (fictional study case R280-C020-1), one partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. 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.
- Let the scheduler retry within configured policies and investigate recurring task failures separately.
- Account for the shuffle in sizing and reduce transferred data before grouping where valid.
- Consolidate required outputs or persist the shared intermediate when multiple actions justify caching.
- Make sink operations idempotent with stable keys or use a transactionally safe supported output mechanism.
Explanation
Correct Answer
A:Let the scheduler retry within configured policies and investigate recurring task failures separately. The technical or governance gap is: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. Check the affected state using: Inspect task attempt numbers and successful partition completions by stage.
Incorrect Answers
B:Account for the shuffle in sizing and reduce transferred data before grouping where valid. That would not resolve the reported problem: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The source-supported intervention is: Let the scheduler retry within configured policies and investigate recurring task failures separately.
C:Consolidate required outputs or persist the shared intermediate when multiple actions justify caching. That would not resolve the reported problem: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The source-supported intervention is: Let the scheduler retry within configured policies and investigate recurring task failures separately.
D:Make sink operations idempotent with stable keys or use a transactionally safe supported output mechanism. That would not resolve the reported problem: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The source-supported intervention is: Let the scheduler retry within configured policies and investigate recurring task failures separately.
Question 97
At Stonebridge Research, while debugging a failed notebook (fictional study case R280-C020-2), one partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. 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.
- Keyed grouping redistributes records between partitions, introducing a wide shuffle dependency and stage boundary.
- Each action can initiate execution of lazy transformations; no persistence or materialized reuse was configured.
- Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
- Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
Explanation
Correct Answer
D:Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. This accounts for the observed condition: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The relevant verification is: Inspect task attempt numbers and successful partition completions by stage.
Incorrect Answers
A:Keyed grouping redistributes records between partitions, introducing a wide shuffle dependency and stage boundary. This is not the root cause established for the reported condition: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The cause is: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
B:Each action can initiate execution of lazy transformations; no persistence or materialized reuse was configured. That explanation needs evidence of another fault. The specific mechanism here is: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
C:Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once. The observed failure instead follows from: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. The alternative does not explain the same dependency.
Question 98
At Cedarline Telecommunications, during a performance incident (fictional study case R280-C020-1), one partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. 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 `Exchange` in the physical plan and per-stage shuffle metrics.
- Inspect Spark UI job history and repeated source scans for each action.
- Inspect task attempt numbers and successful partition completions by stage.
- Compare duplicate invoice IDs with Spark task attempt history after a forced retry.
Explanation
Correct Answer
C:Diagnose the affected path with: Inspect task attempt numbers and successful partition completions by stage. This tests the case-specific cause: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
Incorrect Answers
A:Inspect `Exchange` in the physical plan and per-stage shuffle metrics. That does not establish whether the stated cause is present: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. The diagnostic is: Inspect task attempt numbers and successful partition completions by stage.
B:Inspect Spark UI job history and repeated source scans for each action. That does not establish whether the stated cause is present: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. The diagnostic is: Inspect task attempt numbers and successful partition completions by stage.
D:Compare duplicate invoice IDs with Spark task attempt history after a forced retry. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect task attempt numbers and successful partition completions by stage.
Question 99
At Cobalt Analytics, during a distributed-job recovery test (fictional study case R280-C020-2), one partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. 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 stage plan reflects real network transfer and optimized grouping produces correct aggregates.
- Repeated work is reduced while all requested results remain correct.
- The job finishes with one logical output and no duplicated external side effects.
- A retried task produces one logical invoice record.
Explanation
Correct Answer
C:Acceptance requires: The job finishes with one logical output and no duplicated external side effects. That directly tests whether the mechanism was corrected: Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
Incorrect Answers
A:The stage plan reflects real network transfer and optimized grouping produces correct aggregates. This is not the observed recovery outcome. Acceptance requires: The job finishes with one logical output and no duplicated external side effects.
B:Repeated work is reduced while all requested results remain correct. This is not the observed recovery outcome. Acceptance requires: The job finishes with one logical output and no duplicated external side effects.
D:A retried task produces one logical invoice record. This is not the observed recovery outcome. Acceptance requires: The job finishes with one logical output and no duplicated external side effects.
Question 100
At Summit Supply, while reconciling a reporting dataset (fictional study case R280-C020-1), one partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. 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 the grouping data path, not unrelated narrow transformations.
- Optimize the shared lineage and its actions only.
- Fix the external write contract without disabling Spark fault recovery.
- Limit recovery handling to failed partitions and idempotent sinks.
Explanation
Correct Answer
D:Keep scope tied to the actual issue: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The bounded intervention is: Limit recovery handling to failed partitions and idempotent sinks. Confirm: The job finishes with one logical output and no duplicated external side effects.
Incorrect Answers
A:Change the grouping data path, not unrelated narrow transformations. It is not the bounded choice for the stated condition: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The permitted change must remain: Limit recovery handling to failed partitions and idempotent sinks.
B:Optimize the shared lineage and its actions only. It is not the bounded choice for the stated condition: One partition's executor process crashes, and a replacement task succeeds while the rest of the stage remains intact. The permitted change must remain: Limit recovery handling to failed partitions and idempotent sinks.
C:Fix the external write contract without disabling Spark fault recovery. The action does not preserve the identified scope boundary: Limit recovery handling to failed partitions and idempotent sinks.