Certified Associate Developer for Apache Spark Practice Test 84
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.
Question 831
At Mapleford Engineering, during a distributed-job recovery test (fictional study case R280-C167-1), a file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. 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.
- 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.
- Configure a stable checkpoint and verify idempotent sink recovery on rerun.
- Provide an explicit stable streaming schema with governed evolution or quarantine rules.
Explanation
Correct Answer
C:Configure a stable checkpoint and verify idempotent sink recovery on rerun. The technical or governance gap is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. Check the affected state using: Compare source offsets, checkpoint contents and written files after restart.
Incorrect Answers
A:Use the supported streaming reader and writer with a valid sink and checkpoint. The option targets a different stage or condition. The relevant failure is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. The needed repair is: Configure a stable checkpoint and verify idempotent sink recovery on rerun.
B:Write to a supported persistent sink with proper checkpoint and schema validation. The recorded mechanism is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. The proposed action does not correct that mechanism; use: Configure a stable checkpoint and verify idempotent sink recovery on rerun.
D:Provide an explicit stable streaming schema with governed evolution or quarantine rules. The option targets a different stage or condition. The relevant failure is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. The needed repair is: Configure a stable checkpoint and verify idempotent sink recovery on rerun.
Question 832
At Horizon Logistics, while reconciling a reporting dataset (fictional study case R280-C167-2), a file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. 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.
- Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`.
- Console output is for debugging and is not a durable production data sink.
- Stream checkpoint state is necessary to track committed offsets and sink progress across restarts.
- File-stream schema should be controlled and source changes handled deliberately.
Explanation
Correct Answer
C:The reported symptom is: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. Its direct cause is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. Test that conclusion using: Compare source offsets, checkpoint contents and written files after restart.
Incorrect Answers
A:Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. This is not the root cause established for the reported condition: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. The cause is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts.
B:Console output is for debugging and is not a durable production data sink. This is not the root cause established for the reported condition: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. The cause is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts.
D:File-stream schema should be controlled and source changes handled deliberately. The observed failure instead follows from: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. The alternative does not explain the same dependency.
Question 833
At Aspen Public Services, during a pipeline migration (fictional study case R280-C167-1), a file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. 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 `isStreaming` and observe whether new events trigger output.
- Compare restart availability of console records versus persisted sink files or table rows.
- Compare source offsets, checkpoint contents and written files after restart.
- Test arriving files with old and new field variants.
Explanation
Correct Answer
C:The needed observation is: Compare source offsets, checkpoint contents and written files after restart. The suspected failure is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. The repair should only follow that check.
Incorrect Answers
A:Inspect `isStreaming` and observe whether new events trigger output. That does not establish whether the stated cause is present: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. The diagnostic is: Compare source offsets, checkpoint contents and written files after restart.
B:Compare restart availability of console records versus persisted sink files or table rows. That does not establish whether the stated cause is present: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts. The diagnostic is: Compare source offsets, checkpoint contents and written files after restart.
D:Test arriving files with old and new field variants. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare source offsets, checkpoint contents and written files after restart.
Question 834
At Juniper Foods, after a Spark runtime upgrade (fictional study case R280-C167-2), a file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. 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.
- Records survive restart and match committed batch counts.
- Valid records process under a predictable schema and incompatible records are visible.
Explanation
Correct Answer
A:Existing batches are not blindly duplicated and new data continues. This demonstrates the intended effect of: Configure a stable checkpoint and verify idempotent sink recovery on rerun. The prior failure was: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained.
Incorrect Answers
B:New source events are processed incrementally. The alternative cannot demonstrate that the issue has been corrected: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. The required result is: Existing batches are not blindly duplicated and new data continues.
C:Records survive restart and match committed batch counts. The alternative cannot demonstrate that the issue has been corrected: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. The required result is: Existing batches are not blindly duplicated and new data continues.
D:Valid records process under a predictable schema and incompatible records are visible. Implementation or a check alone is not proof of success. The measurable end state is: Existing batches are not blindly duplicated and new data continues.
Question 835
At Silverpeak Bioinformatics, when validating a daily batch (fictional study case R280-C167-1), a file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. 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.
- Convert only the live event ingestion job.
- Replace only the streaming output destination.
- Configure checkpoint for the one file-sink query.
- Constrain schema evolution to this streaming source.
Explanation
Correct Answer
C:Keep scope tied to the actual issue: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. The bounded intervention is: Configure checkpoint for the one file-sink query. Confirm: Existing batches are not blindly duplicated and new data continues.
Incorrect Answers
A:Convert only the live event ingestion job. It is not the bounded choice for the stated condition: A file-sink streaming job is restarted and unexpectedly reprocesses source ranges because recovery metadata was not retained. The permitted change must remain: Configure checkpoint for the one file-sink query.
B:Replace only the streaming output destination. This does not enforce the required scope: Configure checkpoint for the one file-sink query. The specific failure is: Stream checkpoint state is necessary to track committed offsets and sink progress across restarts.
D:Constrain schema evolution to this streaming source. The action does not preserve the identified scope boundary: Configure checkpoint for the one file-sink query.
Question 836
At Willowbank Software, during a distributed-job recovery test (fictional study case R280-C168-1), a system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. 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.
- Write to a supported persistent sink with proper checkpoint and schema validation.
- Provide an explicit stable streaming schema with governed evolution or quarantine rules.
- Use the supported streaming reader and writer with a valid sink and checkpoint.
- Choose a supported output mode and sink compatible with incremental aggregate semantics.
Explanation
Correct Answer
C:Use the supported streaming reader and writer with a valid sink and checkpoint. This addresses the documented mechanism: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. Recovery is demonstrated when: New source events are processed incrementally.
Incorrect Answers
A:Write to a supported persistent sink with proper checkpoint and schema validation. That would not resolve the reported problem: A system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. The source-supported intervention is: Use the supported streaming reader and writer with a valid sink and checkpoint.
B:Provide an explicit stable streaming schema with governed evolution or quarantine rules. The option targets a different stage or condition. The relevant failure is: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. The needed repair is: Use the supported streaming reader and writer with a valid sink and checkpoint.
D:Choose a supported output mode and sink compatible with incremental aggregate semantics. The recorded mechanism is: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. The proposed action does not correct that mechanism; use: Use the supported streaming reader and writer with a valid sink and checkpoint.
Question 837
At Seabrook Education, while reconciling a reporting dataset (fictional study case R280-C168-2), a system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. 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.
- Console output is for debugging and is not a durable production data sink.
- Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`.
- File-stream schema should be controlled and source changes handled deliberately.
- Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes.
Explanation
Correct Answer
B:A system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. The supporting root cause is: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. The appropriate remedy is: Use the supported streaming reader and writer with a valid sink and checkpoint.
Incorrect Answers
A:Console output is for debugging and is not a durable production data sink. This is not the root cause established for the reported condition: A system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. The cause is: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`.
C:File-stream schema should be controlled and source changes handled deliberately. The observed failure instead follows from: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. The alternative does not explain the same dependency.
D:Append mode cannot emit updated incomplete aggregate results in the same way as update/complete modes. That explanation needs evidence of another fault. The specific mechanism here is: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`.
Question 838
At Bluewater Energy, during a pipeline migration (fictional study case R280-C168-1), a system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. 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 `isStreaming` and observe whether new events trigger output.
- Compare restart availability of console records versus persisted sink files or table rows.
- Test arriving files with old and new field variants.
- Test aggregate updates across successive batches and inspect mode compatibility errors.
Explanation
Correct Answer
A:Inspect `isStreaming` and observe whether new events trigger output. This gathers evidence about the stated mechanism: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. The existing symptom is: A system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive.
Incorrect Answers
B:Compare restart availability of console records versus persisted sink files or table rows. That does not establish whether the stated cause is present: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. The diagnostic is: Inspect `isStreaming` and observe whether new events trigger output.
C:Test arriving files with old and new field variants. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect `isStreaming` and observe whether new events trigger output.
D:Test aggregate updates across successive batches and inspect mode compatibility errors. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect `isStreaming` and observe whether new events trigger output.
Question 839
At Meridian Commerce, after a Spark runtime upgrade (fictional study case R280-C168-2), a system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. 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.
- Records survive restart and match committed batch counts.
- Valid records process under a predictable schema and incompatible records are visible.
- Published totals progress correctly without missing updates.
- New source events are processed incrementally.
Explanation
Correct Answer
D:A passing check shows: New source events are processed incrementally. This is evidence for the scoped change: Use the supported streaming reader and writer with a valid sink and checkpoint.
Incorrect Answers
A:Records survive restart and match committed batch counts. This is not the observed recovery outcome. Acceptance requires: New source events are processed incrementally.
B:Valid records process under a predictable schema and incompatible records are visible. This is not the observed recovery outcome. Acceptance requires: New source events are processed incrementally.
C:Published totals progress correctly without missing updates. The alternative cannot demonstrate that the issue has been corrected: A system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. The required result is: New source events are processed incrementally.
Question 840
At Copperline Finance, when validating a daily batch (fictional study case R280-C168-1), a system reads a Kafka-like source with batch `read` APIs and expects the DataFrame to continuously update as new events arrive. 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 streaming output destination.
- Constrain schema evolution to this streaming source.
- Change mode only for the aggregate output query.
- Convert only the live event ingestion job.
Explanation
Correct Answer
D:Convert only the live event ingestion job. This limits the change while addressing: Batch DataFrames represent a bounded input snapshot; streaming requires `readStream` and `writeStream`. The expected outcome is: New source events are processed incrementally.
Incorrect Answers
A:Replace only the streaming output destination. The action does not preserve the identified scope boundary: Convert only the live event ingestion job.
B:Constrain schema evolution to this streaming source. The action does not preserve the identified scope boundary: Convert only the live event ingestion job.
C:Change mode only for the aggregate output query. The action does not preserve the identified scope boundary: Convert only the live event ingestion job.