Certified Associate Developer for Apache Spark Practice Test 82
Question 810
At Ironlake Networks, after a Spark runtime upgrade (fictional study case R280-C162-1), a dashboard promises every event appears in under 1 ms from a default micro-batch streaming pipeline. 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.
- Adjust only this stream's trigger/latency contract.
- Harden the outbound webhook sink only.
- Set retention only for the affected stateful grouping.
- Tune the overloaded stream's processing path.
Explanation
Correct Answer
A:The relevant boundary is: Adjust only this stream's trigger/latency contract. The correction remains: Set realistic service objectives and select supported trigger/processing architecture based on actual latency requirements.
Incorrect Answers
B:Harden the outbound webhook sink only. The action does not preserve the identified scope boundary: Adjust only this stream's trigger/latency contract.
C:Set retention only for the affected stateful grouping. It is not the bounded choice for the stated condition: A dashboard promises every event appears in under 1 ms from a default micro-batch streaming pipeline. The permitted change must remain: Adjust only this stream's trigger/latency contract.
D:Tune the overloaded stream's processing path. It is not the bounded choice for the stated condition: A dashboard promises every event appears in under 1 ms from a default micro-batch streaming pipeline. The permitted change must remain: Adjust only this stream's trigger/latency contract.
Question 811
At Valleywide Travel, during a performance incident (fictional study case R280-C163-1), a `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. 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.
- Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness.
- Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements.
- Configure a dedicated durable `checkpointLocation` for the query and test restart recovery.
- Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol.
Explanation
Correct Answer
D:The observed defect follows from: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat. The appropriate correction is: Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol. Confirm the result by verifying: Each logical notification is delivered once despite retry.
Incorrect Answers
A:Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness. The option targets a different stage or condition. The relevant failure is: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat. The needed repair is: Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol.
B:Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements. That would not resolve the reported problem: A `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. The source-supported intervention is: Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol.
C:Configure a dedicated durable `checkpointLocation` for the query and test restart recovery. The recorded mechanism is: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat. The proposed action does not correct that mechanism; use: Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol.
Question 812
At Harbor Data Labs, during a distributed-job recovery test (fictional study case R280-C163-2), a `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. 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.
- Unbounded key state accumulates for a long-running query.
- The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
- Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat.
- Stateful recovery requires an appropriate stable checkpoint location for offsets and query state.
Explanation
Correct Answer
C:A `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. The supporting root cause is: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat. The appropriate remedy is: Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol.
Incorrect Answers
A:Unbounded key state accumulates for a long-running query. This is not the root cause established for the reported condition: A `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. The cause is: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat.
B:The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. That explanation needs evidence of another fault. The specific mechanism here is: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat.
D:Stateful recovery requires an appropriate stable checkpoint location for offsets and query state. The observed failure instead follows from: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat. The alternative does not explain the same dependency.
Question 813
At Oakline Transportation, while reconciling a reporting dataset (fictional study case R280-C163-1), a `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. 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.
- Track state-store rows and bytes over successive batches.
- Inspect batch duration, input rate, process rate and backlog.
- Compare checkpoint directory state before/after a controlled driver restart.
- Replay a partially committed batch and inspect webhook event IDs.
Explanation
Correct Answer
D:A `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. The useful diagnostic is: Replay a partially committed batch and inspect webhook event IDs. That can confirm or refute: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat.
Incorrect Answers
A:Track state-store rows and bytes over successive batches. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Replay a partially committed batch and inspect webhook event IDs.
B:Inspect batch duration, input rate, process rate and backlog. The case requires a discriminating check before any change, not the offered alternative. Use: Replay a partially committed batch and inspect webhook event IDs.
C:Compare checkpoint directory state before/after a controlled driver restart. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Replay a partially committed batch and inspect webhook event IDs.
Question 814
At Rosehill Diagnostics, during a pipeline migration (fictional study case R280-C163-2), a `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. 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.
- State stays bounded while valid late events are accounted for by policy.
- Source lag declines while event totals remain correct.
- Restarted processing resumes from persisted progress without unintended duplicate sink records.
- Each logical notification is delivered once despite retry.
Explanation
Correct Answer
D:The verification result must be: Each logical notification is delivered once despite retry. It is stronger evidence than merely performing: Replay a partially committed batch and inspect webhook event IDs.
Incorrect Answers
A:State stays bounded while valid late events are accounted for by policy. Implementation or a check alone is not proof of success. The measurable end state is: Each logical notification is delivered once despite retry.
B:Source lag declines while event totals remain correct. This is not the observed recovery outcome. Acceptance requires: Each logical notification is delivered once despite retry.
C:Restarted processing resumes from persisted progress without unintended duplicate sink records. This is not the observed recovery outcome. Acceptance requires: Each logical notification is delivered once despite retry.
Question 815
At Redwood Transit, after a Spark runtime upgrade (fictional study case R280-C163-1), a `foreachBatch` handler retries after partial success and sends duplicate external HTTP notifications. 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.
- Set retention only for the affected stateful grouping.
- Tune the overloaded stream's processing path.
- Harden the outbound webhook sink only.
- Scope checkpoint storage to this unique streaming query.
Explanation
Correct Answer
C:Harden the outbound webhook sink only. This limits the change while addressing: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat. The expected outcome is: Each logical notification is delivered once despite retry.
Incorrect Answers
A:Set retention only for the affected stateful grouping. This does not enforce the required scope: Harden the outbound webhook sink only. The specific failure is: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat.
B:Tune the overloaded stream's processing path. This does not enforce the required scope: Harden the outbound webhook sink only. The specific failure is: Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat.
D:Scope checkpoint storage to this unique streaming query. The action does not preserve the identified scope boundary: Harden the outbound webhook sink only.
Question 816
At Meadowvale Robotics, during a performance incident (fictional study case R280-C164-1), a streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. 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.
- Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements.
- Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness.
- Configure a dedicated durable `checkpointLocation` for the query and test restart recovery.
- Set realistic service objectives and select supported trigger/processing architecture based on actual latency requirements.
Explanation
Correct Answer
B:The failure mechanism is: Unbounded key state accumulates for a long-running query. Apply the bounded change: Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness. The acceptance test must show: State stays bounded while valid late events are accounted for by policy.
Incorrect Answers
A:Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements. The recorded mechanism is: Unbounded key state accumulates for a long-running query. The proposed action does not correct that mechanism; use: Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness.
C:Configure a dedicated durable `checkpointLocation` for the query and test restart recovery. The option targets a different stage or condition. The relevant failure is: Unbounded key state accumulates for a long-running query. The needed repair is: Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness.
D:Set realistic service objectives and select supported trigger/processing architecture based on actual latency requirements. The option targets a different stage or condition. The relevant failure is: Unbounded key state accumulates for a long-running query. The needed repair is: Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness.
Question 817
At Northridge Retail, during a distributed-job recovery test (fictional study case R280-C164-2), a streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. 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 workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
- Stateful recovery requires an appropriate stable checkpoint location for offsets and query state.
- Unbounded key state accumulates for a long-running query.
- Micro-batch execution occurs in triggers and does not guarantee per-event submillisecond latency.
Explanation
Correct Answer
C:Unbounded key state accumulates for a long-running query. This accounts for the observed condition: A streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. The relevant verification is: Track state-store rows and bytes over successive batches.
Incorrect Answers
A:The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. This is not the root cause established for the reported condition: A streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. The cause is: Unbounded key state accumulates for a long-running query.
B:Stateful recovery requires an appropriate stable checkpoint location for offsets and query state. This is not the root cause established for the reported condition: A streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. The cause is: Unbounded key state accumulates for a long-running query.
D:Micro-batch execution occurs in triggers and does not guarantee per-event submillisecond latency. This is not the root cause established for the reported condition: A streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. The cause is: Unbounded key state accumulates for a long-running query.
Question 818
At Northstar Payments, while reconciling a reporting dataset (fictional study case R280-C164-1), a streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. 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 batch duration, input rate, process rate and backlog.
- Compare checkpoint directory state before/after a controlled driver restart.
- Track state-store rows and bytes over successive batches.
- Measure source-to-sink latency by trigger under representative load.
Explanation
Correct Answer
C:Diagnose the affected path with: Track state-store rows and bytes over successive batches. This tests the case-specific cause: Unbounded key state accumulates for a long-running query.
Incorrect Answers
A:Inspect batch duration, input rate, process rate and backlog. That does not establish whether the stated cause is present: Unbounded key state accumulates for a long-running query. The diagnostic is: Track state-store rows and bytes over successive batches.
B:Compare checkpoint directory state before/after a controlled driver restart. That does not establish whether the stated cause is present: Unbounded key state accumulates for a long-running query. The diagnostic is: Track state-store rows and bytes over successive batches.
D:Measure source-to-sink latency by trigger under representative load. The case requires a discriminating check before any change, not the offered alternative. Use: Track state-store rows and bytes over successive batches.
Question 819
At Cloudhaven Apps, during a pipeline migration (fictional study case R280-C164-2), a streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. 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.
- State stays bounded while valid late events are accounted for by policy.
- Source lag declines while event totals remain correct.
- Restarted processing resumes from persisted progress without unintended duplicate sink records.
- Declared latency objective matches observed processing mode.
Explanation
Correct Answer
A:State stays bounded while valid late events are accounted for by policy. This demonstrates the intended effect of: Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness. The prior failure was: A streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk.
Incorrect Answers
B:Source lag declines while event totals remain correct. This is not the observed recovery outcome. Acceptance requires: State stays bounded while valid late events are accounted for by policy.
C:Restarted processing resumes from persisted progress without unintended duplicate sink records. Implementation or a check alone is not proof of success. The measurable end state is: State stays bounded while valid late events are accounted for by policy.
D:Declared latency objective matches observed processing mode. This is not the observed recovery outcome. Acceptance requires: State stays bounded while valid late events are accounted for by policy.
Question 820
At Bayshore Healthcare, after a Spark runtime upgrade (fictional study case R280-C164-1), a streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. 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 overloaded stream's processing path.
- Scope checkpoint storage to this unique streaming query.
- Set retention only for the affected stateful grouping.
- Adjust only this stream's trigger/latency contract.
Explanation
Correct Answer
C:The relevant boundary is: Set retention only for the affected stateful grouping. The correction remains: Introduce an appropriate supported watermark or state timeout policy that respects accepted lateness.
Incorrect Answers
A:Tune the overloaded stream's processing path. It is not the bounded choice for the stated condition: A streaming aggregation stores every historical user key without watermark or state expiration and runs out of disk. The permitted change must remain: Set retention only for the affected stateful grouping.
B:Scope checkpoint storage to this unique streaming query. The action does not preserve the identified scope boundary: Set retention only for the affected stateful grouping.
D:Adjust only this stream's trigger/latency contract. This does not enforce the required scope: Set retention only for the affected stateful grouping. The specific failure is: Unbounded key state accumulates for a long-running query.