Certified Associate Developer for Apache Spark Practice Test 83
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.
Question 821
At Stonebridge Research, during a performance incident (fictional study case R280-C165-1), a stream configured to start a microbatch every second remains five minutes behind under sustained source load. 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.
- 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.
- Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol.
Explanation
Correct Answer
A:Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements. This addresses the documented mechanism: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. Recovery is demonstrated when: Source lag declines while event totals remain correct.
Incorrect Answers
B:Configure a dedicated durable `checkpointLocation` for the query and test restart recovery. The recorded mechanism is: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. The proposed action does not correct that mechanism; use: Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements.
C:Set realistic service objectives and select supported trigger/processing architecture based on actual latency requirements. That would not resolve the reported problem: A stream configured to start a microbatch every second remains five minutes behind under sustained source load. The source-supported intervention is: Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements.
D:Include stable batch or event IDs and deduplicate at the sink under a tested idempotency protocol. That would not resolve the reported problem: A stream configured to start a microbatch every second remains five minutes behind under sustained source load. The source-supported intervention is: Improve throughput, partitioning or compute capacity, and set a feasible trigger based on measurements.
Question 822
At Cedarline Telecommunications, during a distributed-job recovery test (fictional study case R280-C165-2), a stream configured to start a microbatch every second remains five minutes behind under sustained source load. 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.
- Stateful recovery requires an appropriate stable checkpoint location for offsets and query state.
- The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
- Micro-batch execution occurs in triggers and does not guarantee per-event submillisecond latency.
- Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat.
Explanation
Correct Answer
B:The reported symptom is: A stream configured to start a microbatch every second remains five minutes behind under sustained source load. Its direct cause is: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. Test that conclusion using: Inspect batch duration, input rate, process rate and backlog.
Incorrect Answers
A:Stateful recovery requires an appropriate stable checkpoint location for offsets and query state. The observed failure instead follows from: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. The alternative does not explain the same dependency.
C:Micro-batch execution occurs in triggers and does not guarantee per-event submillisecond latency. The observed failure instead follows from: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. The alternative does not explain the same dependency.
D:Exactly-once processing needs idempotent or transactional sink semantics; arbitrary HTTP side effects may repeat. This is not the root cause established for the reported condition: A stream configured to start a microbatch every second remains five minutes behind under sustained source load. The cause is: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
Question 823
At Cobalt Analytics, while reconciling a reporting dataset (fictional study case R280-C165-1), a stream configured to start a microbatch every second remains five minutes behind under sustained source load. 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 checkpoint directory state before/after a controlled driver restart.
- Inspect batch duration, input rate, process rate and backlog.
- Measure source-to-sink latency by trigger under representative load.
- Replay a partially committed batch and inspect webhook event IDs.
Explanation
Correct Answer
B:A stream configured to start a microbatch every second remains five minutes behind under sustained source load. The useful diagnostic is: Inspect batch duration, input rate, process rate and backlog. That can confirm or refute: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
Incorrect Answers
A:Compare checkpoint directory state before/after a controlled driver restart. That does not establish whether the stated cause is present: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. The diagnostic is: Inspect batch duration, input rate, process rate and backlog.
C:Measure source-to-sink latency by trigger under representative load. The case requires a discriminating check before any change, not the offered alternative. Use: Inspect batch duration, input rate, process rate and backlog.
D:Replay a partially committed batch and inspect webhook event IDs. That does not establish whether the stated cause is present: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up. The diagnostic is: Inspect batch duration, input rate, process rate and backlog.
Question 824
At Summit Supply, during a pipeline migration (fictional study case R280-C165-2), a stream configured to start a microbatch every second remains five minutes behind under sustained source load. 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.
- Restarted processing resumes from persisted progress without unintended duplicate sink records.
- Declared latency objective matches observed processing mode.
- Each logical notification is delivered once despite retry.
- Source lag declines while event totals remain correct.
Explanation
Correct Answer
D:The verification result must be: Source lag declines while event totals remain correct. It is stronger evidence than merely performing: Inspect batch duration, input rate, process rate and backlog.
Incorrect Answers
A: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: Source lag declines while event totals remain correct.
B:Declared latency objective matches observed processing mode. The alternative cannot demonstrate that the issue has been corrected: A stream configured to start a microbatch every second remains five minutes behind under sustained source load. The required result is: Source lag declines while event totals remain correct.
C:Each logical notification is delivered once despite retry. This is not the observed recovery outcome. Acceptance requires: Source lag declines while event totals remain correct.
Question 825
At Granite Insurance, after a Spark runtime upgrade (fictional study case R280-C165-1), a stream configured to start a microbatch every second remains five minutes behind under sustained source load. 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.
- Adjust only this stream's trigger/latency contract.
- Harden the outbound webhook sink only.
Explanation
Correct Answer
A:Keep the intervention within this boundary: Tune the overloaded stream's processing path. The reported failure mechanism is: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
Incorrect Answers
B:Scope checkpoint storage to this unique streaming query. This does not enforce the required scope: Tune the overloaded stream's processing path. The specific failure is: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
C:Adjust only this stream's trigger/latency contract. This does not enforce the required scope: Tune the overloaded stream's processing path. The specific failure is: The workload's processing cost exceeds trigger interval; triggers cannot run infinitely in parallel to catch up.
D:Harden the outbound webhook sink only. It is not the bounded choice for the stated condition: A stream configured to start a microbatch every second remains five minutes behind under sustained source load. The permitted change must remain: Tune the overloaded stream's processing path.
Question 826
At Elmwood Manufacturing, during a distributed-job recovery test (fictional study case R280-C166-1), a streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. 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.
- Choose a supported output mode and sink compatible with incremental aggregate semantics.
- Configure a stable checkpoint and verify idempotent sink recovery on rerun.
- Use the supported streaming reader and writer with a valid sink and checkpoint.
- Write to a supported persistent sink with proper checkpoint and schema validation.
Explanation
Correct Answer
A:Choose a supported output mode and sink compatible with incremental aggregate semantics. The technical or governance gap is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes. Check the affected state using: Test aggregate updates across successive batches and inspect mode compatibility errors.
Incorrect Answers
B:Configure a stable checkpoint and verify idempotent sink recovery on rerun. That would not resolve the reported problem: A streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. The source-supported intervention is: Choose a supported output mode and sink compatible with incremental aggregate semantics.
C:Use the supported streaming reader and writer with a valid sink and checkpoint. The recorded mechanism is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes. The proposed action does not correct that mechanism; use: Choose a supported output mode and sink compatible with incremental aggregate semantics.
D:Write to a supported persistent sink with proper checkpoint and schema validation. The recorded mechanism is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes. The proposed action does not correct that mechanism; use: Choose a supported output mode and sink compatible with incremental aggregate semantics.
Question 827
At Lakeside Devices, while reconciling a reporting dataset (fictional study case R280-C166-2), a streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. 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.
- Stream checkpoint state is necessary to track committed offsets and sink progress across restarts.
- Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`.
- Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
- Console output is for debugging and is not a durable production data sink.
Explanation
Correct Answer
C:A streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. The supporting root cause is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes. The appropriate remedy is: Choose a supported output mode and sink compatible with incremental aggregate semantics.
Incorrect Answers
A:Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. That explanation needs evidence of another fault. The specific mechanism here is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
B:Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. That explanation needs evidence of another fault. The specific mechanism here is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
D:Console output is for debugging and is not a durable production data sink. That explanation needs evidence of another fault. The specific mechanism here is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
Question 828
At Bayfront Markets, during a pipeline migration (fictional study case R280-C166-1), a streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. 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 source offsets, checkpoint contents and written files after restart.
- Inspect `isStreaming` and observe whether new events trigger output.
- Test aggregate updates across successive batches and inspect mode compatibility errors.
- Compare restart availability of console records versus persisted sink files or table rows.
Explanation
Correct Answer
C:A streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. The useful diagnostic is: Test aggregate updates across successive batches and inspect mode compatibility errors. That can confirm or refute: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
Incorrect Answers
A:Compare source offsets, checkpoint contents and written files after restart. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Test aggregate updates across successive batches and inspect mode compatibility errors.
B:Inspect `isStreaming` and observe whether new events trigger output. That does not establish whether the stated cause is present: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes. The diagnostic is: Test aggregate updates across successive batches and inspect mode compatibility errors.
D:Compare restart availability of console records versus persisted sink files or table rows. That does not establish whether the stated cause is present: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes. The diagnostic is: Test aggregate updates across successive batches and inspect mode compatibility errors.
Question 829
At Orion Fintech, after a Spark runtime upgrade (fictional study case R280-C166-2), a streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. 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.
- Existing batches are not blindly duplicated and new data continues.
- New source events are processed incrementally.
- Published totals progress correctly without missing updates.
- Records survive restart and match committed batch counts.
Explanation
Correct Answer
C:The verification result must be: Published totals progress correctly without missing updates. It is stronger evidence than merely performing: Test aggregate updates across successive batches and inspect mode compatibility errors.
Incorrect Answers
A:Existing batches are not blindly duplicated and new data continues. This is not the observed recovery outcome. Acceptance requires: Published totals progress correctly without missing updates.
B:New source events are processed incrementally. Implementation or a check alone is not proof of success. The measurable end state is: Published totals progress correctly without missing updates.
D:Records survive restart and match committed batch counts. The alternative cannot demonstrate that the issue has been corrected: A streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. The required result is: Published totals progress correctly without missing updates.
Question 830
At Westfield Insights, when validating a daily batch (fictional study case R280-C166-1), a streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. 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.
- Configure checkpoint for the one file-sink query.
- Change mode only for the aggregate output query.
- Convert only the live event ingestion job.
- Replace only the streaming output destination.
Explanation
Correct Answer
B:Keep the intervention within this boundary: Change mode only for the aggregate output query. The reported failure mechanism is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
Incorrect Answers
A:Configure checkpoint for the one file-sink query. It is not the bounded choice for the stated condition: A streaming group-by with mutable totals is sent to an append-only sink and expected to update each key every batch. The permitted change must remain: Change mode only for the aggregate output query.
C:Convert only the live event ingestion job. This does not enforce the required scope: Change mode only for the aggregate output query. The specific failure is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
D:Replace only the streaming output destination. This does not enforce the required scope: Change mode only for the aggregate output query. The specific failure is: Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.