Certified Associate Developer for Apache Spark Practice Test 12
Question 110
At Juniper Foods, while reconciling a reporting dataset (fictional study case R280-C022-1), a notebook calls `count()`, `show()` and `collect()` on the same uncached lineage and unexpectedly launches separate Spark jobs. 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.
- Fix the external write contract without disabling Spark fault recovery.
- Address the affected shuffle and executor health, not the source schema.
- Update performance diagnosis, not the logical query output.
- Optimize the shared lineage and its actions only.
Explanation
Correct Answer
D:Keep scope tied to the actual issue: A notebook calls `count()`, `show()` and `collect()` on the same uncached lineage and unexpectedly launches separate Spark jobs. The bounded intervention is: Optimize the shared lineage and its actions only. Confirm: Repeated work is reduced while all requested results remain correct.
Incorrect Answers
A:Fix the external write contract without disabling Spark fault recovery. The action does not preserve the identified scope boundary: Optimize the shared lineage and its actions only.
B:Address the affected shuffle and executor health, not the source schema. This does not enforce the required scope: Optimize the shared lineage and its actions only. The specific failure is: Each action can initiate execution of lazy transformations; no persistence or materialized reuse was configured.
C:Update performance diagnosis, not the logical query output. It is not the bounded choice for the stated condition: A notebook calls `count()`, `show()` and `collect()` on the same uncached lineage and unexpectedly launches separate Spark jobs. The permitted change must remain: Optimize the shared lineage and its actions only.
Question 111
At Silverpeak Bioinformatics, after a routine data refresh (fictional study case R280-C023-1), a `foreachPartition` task retries and writes the same invoice twice to an external non-idempotent API. 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.
- Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn.
- Make sink operations idempotent with stable keys or use a transactionally safe supported output mechanism.
- Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
- Let the scheduler retry within configured policies and investigate recurring task failures separately.
Explanation
Correct Answer
B:The failure mechanism is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once. Apply the bounded change: Make sink operations idempotent with stable keys or use a transactionally safe supported output mechanism. The acceptance test must show: A retried task produces one logical invoice record.
Incorrect Answers
A:Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn. The option targets a different stage or condition. The relevant failure is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once. The needed repair is: Make sink operations idempotent with stable keys or use a transactionally safe supported output mechanism.
C:Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly. The recorded mechanism is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once. The proposed action does not correct that mechanism; use: Make sink operations idempotent with stable keys or use a transactionally safe supported output mechanism.
D:Let the scheduler retry within configured policies and investigate recurring task failures separately. The recorded mechanism is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once. The proposed action does not correct that mechanism; use: Make sink operations idempotent with stable keys or use a transactionally safe supported output mechanism.
Question 112
At Willowbank Software, while debugging a failed notebook (fictional study case R280-C023-2), a `foreachPartition` task retries and writes the same invoice twice to an external non-idempotent API. 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.
- Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue.
- Stages are derived from shuffle and execution boundaries rather than one-to-one source statements.
- Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
- Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
Explanation
Correct Answer
D:Investigation should distinguish this specific mechanism: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once. The related symptom is: A `foreachPartition` task retries and writes the same invoice twice to an external non-idempotent API. The discriminating check is: Compare duplicate invoice IDs with Spark task attempt history after a forced retry.
Incorrect Answers
A:Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue. That explanation needs evidence of another fault. The specific mechanism here is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
B:Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. That explanation needs evidence of another fault. The specific mechanism here is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
C:Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. That explanation needs evidence of another fault. The specific mechanism here is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
Question 113
At Seabrook Education, during a performance incident (fictional study case R280-C023-1), a `foreachPartition` task retries and writes the same invoice twice to an external non-idempotent API. 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.
- Trace lost executor, missing shuffle blocks and resubmitted task attempts.
- Compare Exchange operators and DAG stage dependencies with the UI.
- 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
D:Use this focused test: Compare duplicate invoice IDs with Spark task attempt history after a forced retry. The test distinguishes the reported condition from alternatives by checking: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
Incorrect Answers
A:Trace lost executor, missing shuffle blocks and resubmitted task attempts. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare duplicate invoice IDs with Spark task attempt history after a forced retry.
B:Compare Exchange operators and DAG stage dependencies with the UI. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare duplicate invoice IDs with Spark task attempt history after a forced retry.
C:Inspect task attempt numbers and successful partition completions by stage. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare duplicate invoice IDs with Spark task attempt history after a forced retry.
Question 114
At Bluewater Energy, during a distributed-job recovery test (fictional study case R280-C023-2), a `foreachPartition` task retries and writes the same invoice twice to an external non-idempotent API. 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 DAG reaches completion with correct rows after simulated executor loss.
- A retried task produces one logical invoice record.
- The runbook identifies the actual stage and job boundaries for the pipeline.
- The job finishes with one logical output and no duplicated external side effects.
Explanation
Correct Answer
B:The verification result must be: A retried task produces one logical invoice record. It is stronger evidence than merely performing: Compare duplicate invoice IDs with Spark task attempt history after a forced retry.
Incorrect Answers
A:The DAG reaches completion with correct rows after simulated executor loss. Implementation or a check alone is not proof of success. The measurable end state is: A retried task produces one logical invoice record.
C:The runbook identifies the actual stage and job boundaries for the pipeline. Implementation or a check alone is not proof of success. The measurable end state is: A retried task produces one logical invoice record.
D:The job finishes with one logical output and no duplicated external side effects. Implementation or a check alone is not proof of success. The measurable end state is: A retried task produces one logical invoice record.
Question 115
At Meridian Commerce, while reconciling a reporting dataset (fictional study case R280-C023-1), a `foreachPartition` task retries and writes the same invoice twice to an external non-idempotent API. 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.
- Fix the external write contract without disabling Spark fault recovery.
- Address the affected shuffle and executor health, not the source schema.
- Update performance diagnosis, not the logical query output.
- Limit recovery handling to failed partitions and idempotent sinks.
Explanation
Correct Answer
A:Keep the intervention within this boundary: Fix the external write contract without disabling Spark fault recovery. The reported failure mechanism is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
Incorrect Answers
B:Address the affected shuffle and executor health, not the source schema. This does not enforce the required scope: Fix the external write contract without disabling Spark fault recovery. The specific failure is: Task-attempt retries can rerun user code; arbitrary external side effects are not automatically exactly-once.
C:Update performance diagnosis, not the logical query output. The action does not preserve the identified scope boundary: Fix the external write contract without disabling Spark fault recovery.
D:Limit recovery handling to failed partitions and idempotent sinks. The action does not preserve the identified scope boundary: Fix the external write contract without disabling Spark fault recovery.
Question 116
At Copperline Finance, after a routine data refresh (fictional study case R280-C024-1), the scheduler resubmits shuffle map work after an executor holding shuffle data disappears. 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.
- Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn.
- Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly.
- 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.
Explanation
Correct Answer
A:The observed defect follows from: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue. The appropriate correction is: Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn. Confirm the result by verifying: The DAG reaches completion with correct rows after simulated executor loss.
Incorrect Answers
B:Inspect the optimized plan and Spark UI stages to map transformations to stage boundaries correctly. That would not resolve the reported problem: The scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The source-supported intervention is: Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn.
C:Let the scheduler retry within configured policies and investigate recurring task failures separately. The recorded mechanism is: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue. The proposed action does not correct that mechanism; use: Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn.
D: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: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue. The needed repair is: Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn.
Question 117
At Pinecrest Media, while debugging a failed notebook (fictional study case R280-C024-2), the scheduler resubmits shuffle map work after an executor holding shuffle data disappears. 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.
- Stages are derived from shuffle and execution boundaries rather than one-to-one source statements.
- Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed.
- Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue.
- Keyed grouping redistributes records between partitions, introducing a wide shuffle dependency and stage boundary.
Explanation
Correct Answer
C:The scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The supporting root cause is: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue. The appropriate remedy is: Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn.
Incorrect Answers
A:Stages are derived from shuffle and execution boundaries rather than one-to-one source statements. The observed failure instead follows from: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue. The alternative does not explain the same dependency.
B:Spark can retry individual lost tasks based on lineage; a single task retry does not imply all data was recomputed. This is not the root cause established for the reported condition: The scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The cause is: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue.
D: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: The scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The cause is: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue.
Question 118
At Ironlake Networks, during a performance incident (fictional study case R280-C024-1), the scheduler resubmits shuffle map work after an executor holding shuffle data disappears. 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.
- Trace lost executor, missing shuffle blocks and resubmitted task attempts.
- Compare Exchange operators and DAG stage dependencies with the UI.
- Inspect task attempt numbers and successful partition completions by stage.
- Inspect `Exchange` in the physical plan and per-stage shuffle metrics.
Explanation
Correct Answer
A:Diagnose the affected path with: Trace lost executor, missing shuffle blocks and resubmitted task attempts. This tests the case-specific cause: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue.
Incorrect Answers
B:Compare Exchange operators and DAG stage dependencies with the UI. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Trace lost executor, missing shuffle blocks and resubmitted task attempts.
C:Inspect task attempt numbers and successful partition completions by stage. The case requires a discriminating check before any change, not the offered alternative. Use: Trace lost executor, missing shuffle blocks and resubmitted task attempts.
D:Inspect `Exchange` in the physical plan and per-stage shuffle metrics. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Trace lost executor, missing shuffle blocks and resubmitted task attempts.
Question 119
At Valleywide Travel, during a distributed-job recovery test (fictional study case R280-C024-2), the scheduler resubmits shuffle map work after an executor holding shuffle data disappears. 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 runbook identifies the actual stage and job boundaries for the pipeline.
- 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 DAG reaches completion with correct rows after simulated executor loss.
Explanation
Correct Answer
D:The DAG reaches completion with correct rows after simulated executor loss. This demonstrates the intended effect of: Preserve recoverable inputs and allow supported shuffle/task recovery while investigating executor churn. The prior failure was: The scheduler resubmits shuffle map work after an executor holding shuffle data disappears.
Incorrect Answers
A:The runbook identifies the actual stage and job boundaries for the pipeline. This is not the observed recovery outcome. Acceptance requires: The DAG reaches completion with correct rows after simulated executor loss.
B:The job finishes with one logical output and no duplicated external side effects. This is not the observed recovery outcome. Acceptance requires: The DAG reaches completion with correct rows after simulated executor loss.
C:The stage plan reflects real network transfer and optimized grouping produces correct aggregates. Implementation or a check alone is not proof of success. The measurable end state is: The DAG reaches completion with correct rows after simulated executor loss.
Question 120
At Harbor Data Labs, while reconciling a reporting dataset (fictional study case R280-C024-1), the scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The change owner wants to avoid damaging unrelated tables, jobs or access. Which change boundary BEST limits the correction to the affected Spark workload? Select ONE best answer. This is unofficial original Spark educational practice, not a real certification item.
- Update performance diagnosis, not the logical query output.
- Limit recovery handling to failed partitions and idempotent sinks.
- Change the grouping data path, not unrelated narrow transformations.
- Address the affected shuffle and executor health, not the source schema.
Explanation
Correct Answer
D:Keep the intervention within this boundary: Address the affected shuffle and executor health, not the source schema. The reported failure mechanism is: Lost shuffle blocks may require upstream task recomputation from lineage before dependent tasks continue.
Incorrect Answers
A:Update performance diagnosis, not the logical query output. The action does not preserve the identified scope boundary: Address the affected shuffle and executor health, not the source schema.
B:Limit recovery handling to failed partitions and idempotent sinks. The action does not preserve the identified scope boundary: Address the affected shuffle and executor health, not the source schema.
C:Change the grouping data path, not unrelated narrow transformations. It is not the bounded choice for the stated condition: The scheduler resubmits shuffle map work after an executor holding shuffle data disappears. The permitted change must remain: Address the affected shuffle and executor health, not the source schema.