Certified Associate Developer for Apache Spark Practice Test 16
Question 150
At Ironlake Networks, while optimizing an ETL application (fictional study case R280-C030-1), a developer sets `spark.sql.shuffle.partitions=32` believing it will start 32 executors, but CPU allocation remains unchanged. 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 output partition count only for the small result.
- Separate shuffle configuration from cluster provisioning.
- Repartition the bottleneck stage, not all upstream sources.
- Apply skew mitigation to that keyed operation only.
Explanation
Correct Answer
B:The relevant boundary is: Separate shuffle configuration from cluster provisioning. The correction remains: Tune shuffle partitions using data volume while configuring cluster executor resources separately.
Incorrect Answers
A:Adjust output partition count only for the small result. It is not the bounded choice for the stated condition: A developer sets `spark.sql.shuffle.partitions=32` believing it will start 32 executors, but CPU allocation remains unchanged. The permitted change must remain: Separate shuffle configuration from cluster provisioning.
C:Repartition the bottleneck stage, not all upstream sources. The action does not preserve the identified scope boundary: Separate shuffle configuration from cluster provisioning.
D:Apply skew mitigation to that keyed operation only. The action does not preserve the identified scope boundary: Separate shuffle configuration from cluster provisioning.
Question 151
At Valleywide Travel, after a routine data refresh (fictional study case R280-C031-1), an engineer inspects a variable after calling `df.filter(...)` and expects remote storage to have been read immediately. 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.
- Trigger a suitable bounded action such as `count()` or `show()` only when actual computation is needed.
- Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate.
- Use `explain()` to inspect planning and a separate bounded action or test for data correctness.
- Inspect the actual physical plan and move compatible selective filters ahead of costly operations where needed.
Explanation
Correct Answer
A:An engineer inspects a variable after calling `df.filter(..)` and expects remote storage to have been read immediately. The underlying cause is: `filter` is a lazy transformation and generally builds a logical plan until an action is requested. The corrective step is: Trigger a suitable bounded action such as `count()` or `show()` only when actual computation is needed. Validate the outcome: No data scan occurs from the transformation alone; the intended action produces results.
Incorrect Answers
B:Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate. That would not resolve the reported problem: An engineer inspects a variable after calling `df.filter(..)` and expects remote storage to have been read immediately. The source-supported intervention is: Trigger a suitable bounded action such as `count()` or `show()` only when actual computation is needed.
C:Use `explain()` to inspect planning and a separate bounded action or test for data correctness. The option targets a different stage or condition. The relevant failure is: `filter` is a lazy transformation and generally builds a logical plan until an action is requested. The needed repair is: Trigger a suitable bounded action such as `count()` or `show()` only when actual computation is needed.
D:Inspect the actual physical plan and move compatible selective filters ahead of costly operations where needed. The recorded mechanism is: `filter` is a lazy transformation and generally builds a logical plan until an action is requested. The proposed action does not correct that mechanism; use: Trigger a suitable bounded action such as `count()` or `show()` only when actual computation is needed.
Question 152
At Harbor Data Labs, while debugging a failed notebook (fictional study case R280-C031-2), an engineer inspects a variable after calling `df.filter(...)` and expects remote storage to have been read immediately. 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.
- Each action can execute the lineage again when intermediates are not persisted.
- `filter` is a lazy transformation and generally builds a logical plan until an action is requested.
- `explain()` displays a plan; it is not equivalent to an action validating actual result records.
- The optimizer may push supported predicates, but UDFs or plan constraints can block predicate movement.
Explanation
Correct Answer
B:Investigation should distinguish this specific mechanism: `filter` is a lazy transformation and generally builds a logical plan until an action is requested. The related symptom is: An engineer inspects a variable after calling `df.filter(..)` and expects remote storage to have been read immediately. The discriminating check is: Compare execution metrics before and after calling a real action.
Incorrect Answers
A:Each action can execute the lineage again when intermediates are not persisted. That explanation needs evidence of another fault. The specific mechanism here is: `filter` is a lazy transformation and generally builds a logical plan until an action is requested.
C:`explain()` displays a plan; it is not equivalent to an action validating actual result records. The observed failure instead follows from: `filter` is a lazy transformation and generally builds a logical plan until an action is requested. The alternative does not explain the same dependency.
D:The optimizer may push supported predicates, but UDFs or plan constraints can block predicate movement. The observed failure instead follows from: `filter` is a lazy transformation and generally builds a logical plan until an action is requested. The alternative does not explain the same dependency.
Question 153
At Oakline Transportation, during a performance incident (fictional study case R280-C031-1), an engineer inspects a variable after calling `df.filter(...)` and expects remote storage to have been read immediately. 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 number of Spark jobs and repeated shuffle stages to the number of actions.
- Compare the absence of full task execution during plan inspection with a subsequent count or checksum.
- Review predicate location in `explain()` and compare shuffle bytes.
- Compare execution metrics before and after calling a real action.
Explanation
Correct Answer
D:Diagnose the affected path with: Compare execution metrics before and after calling a real action. This tests the case-specific cause: `filter` is a lazy transformation and generally builds a logical plan until an action is requested.
Incorrect Answers
A:Compare number of Spark jobs and repeated shuffle stages to the number of actions. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare execution metrics before and after calling a real action.
B:Compare the absence of full task execution during plan inspection with a subsequent count or checksum. The case requires a discriminating check before any change, not the offered alternative. Use: Compare execution metrics before and after calling a real action.
C:Review predicate location in `explain()` and compare shuffle bytes. The case requires a discriminating check before any change, not the offered alternative. Use: Compare execution metrics before and after calling a real action.
Question 154
At Rosehill Diagnostics, during a distributed-job recovery test (fictional study case R280-C031-2), an engineer inspects a variable after calling `df.filter(...)` and expects remote storage to have been read immediately. 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 pipeline returns the same totals with fewer redundant computations.
- No data scan occurs from the transformation alone; the intended action produces results.
- The plan and the real result are verified by appropriate separate checks.
- Intended rows are preserved and avoidable upstream work is reduced.
Explanation
Correct Answer
B:No data scan occurs from the transformation alone; the intended action produces results. This demonstrates the intended effect of: Trigger a suitable bounded action such as `count()` or `show()` only when actual computation is needed. The prior failure was: An engineer inspects a variable after calling `df.filter(..)` and expects remote storage to have been read immediately.
Incorrect Answers
A:The pipeline returns the same totals with fewer redundant computations. Implementation or a check alone is not proof of success. The measurable end state is: No data scan occurs from the transformation alone; the intended action produces results.
C:The plan and the real result are verified by appropriate separate checks. The alternative cannot demonstrate that the issue has been corrected: An engineer inspects a variable after calling `df.filter(..)` and expects remote storage to have been read immediately. The required result is: No data scan occurs from the transformation alone; the intended action produces results.
D:Intended rows are preserved and avoidable upstream work is reduced. Implementation or a check alone is not proof of success. The measurable end state is: No data scan occurs from the transformation alone; the intended action produces results.
Question 155
At Redwood Transit, while reconciling a reporting dataset (fictional study case R280-C031-1), an engineer inspects a variable after calling `df.filter(...)` and expects remote storage to have been read immediately. 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.
- Limit caching and action reduction to the repeated lineage.
- Avoid materializing large data merely to inspect a logical plan.
- Preserve separation of plan diagnostics from data validation.
- Optimize only the affected filter/join chain.
Explanation
Correct Answer
B:The relevant boundary is: Avoid materializing large data merely to inspect a logical plan. The correction remains: Trigger a suitable bounded action such as `count()` or `show()` only when actual computation is needed.
Incorrect Answers
A:Limit caching and action reduction to the repeated lineage. It is not the bounded choice for the stated condition: An engineer inspects a variable after calling `df.filter(..)` and expects remote storage to have been read immediately. The permitted change must remain: Avoid materializing large data merely to inspect a logical plan.
C:Preserve separation of plan diagnostics from data validation. It is not the bounded choice for the stated condition: An engineer inspects a variable after calling `df.filter(..)` and expects remote storage to have been read immediately. The permitted change must remain: Avoid materializing large data merely to inspect a logical plan.
D:Optimize only the affected filter/join chain. This does not enforce the required scope: Avoid materializing large data merely to inspect a logical plan. The specific failure is: `filter` is a lazy transformation and generally builds a logical plan until an action is requested.
Question 156
At Meadowvale Robotics, after a routine data refresh (fictional study case R280-C032-1), a pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. 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 `explain()` to inspect planning and a separate bounded action or test for data correctness.
- Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate.
- Inspect the actual physical plan and move compatible selective filters ahead of costly operations where needed.
- Run targeted full-data validation aggregations or objective-stratified tests for the fields of concern.
Explanation
Correct Answer
B:Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate. The technical or governance gap is: Each action can execute the lineage again when intermediates are not persisted. Check the affected state using: Compare number of Spark jobs and repeated shuffle stages to the number of actions.
Incorrect Answers
A:Use `explain()` to inspect planning and a separate bounded action or test for data correctness. The recorded mechanism is: Each action can execute the lineage again when intermediates are not persisted. The proposed action does not correct that mechanism; use: Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate.
C:Inspect the actual physical plan and move compatible selective filters ahead of costly operations where needed. The recorded mechanism is: Each action can execute the lineage again when intermediates are not persisted. The proposed action does not correct that mechanism; use: Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate.
D:Run targeted full-data validation aggregations or objective-stratified tests for the fields of concern. That would not resolve the reported problem: A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. The source-supported intervention is: Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate.
Question 157
At Northridge Retail, while debugging a failed notebook (fictional study case R280-C032-2), a pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. 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.
- `explain()` displays a plan; it is not equivalent to an action validating actual result records.
- The optimizer may push supported predicates, but UDFs or plan constraints can block predicate movement.
- A bounded action checks at most a sample and cannot establish dataset-wide quality.
- Each action can execute the lineage again when intermediates are not persisted.
Explanation
Correct Answer
D:The failure is explained by: Each action can execute the lineage again when intermediates are not persisted. A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. Correcting it would require: Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate.
Incorrect Answers
A:`explain()` displays a plan; it is not equivalent to an action validating actual result records. That explanation needs evidence of another fault. The specific mechanism here is: Each action can execute the lineage again when intermediates are not persisted.
B:The optimizer may push supported predicates, but UDFs or plan constraints can block predicate movement. That explanation needs evidence of another fault. The specific mechanism here is: Each action can execute the lineage again when intermediates are not persisted.
C:A bounded action checks at most a sample and cannot establish dataset-wide quality. This is not the root cause established for the reported condition: A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. The cause is: Each action can execute the lineage again when intermediates are not persisted.
Question 158
At Northstar Payments, during a performance incident (fictional study case R280-C032-1), a pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. 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 number of Spark jobs and repeated shuffle stages to the number of actions.
- Compare the absence of full task execution during plan inspection with a subsequent count or checksum.
- Review predicate location in `explain()` and compare shuffle bytes.
- Compare sample results with distributed invalid-row counts and error summaries.
Explanation
Correct Answer
A:Compare number of Spark jobs and repeated shuffle stages to the number of actions. This gathers evidence about the stated mechanism: Each action can execute the lineage again when intermediates are not persisted. The existing symptom is: A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins.
Incorrect Answers
B:Compare the absence of full task execution during plan inspection with a subsequent count or checksum. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Compare number of Spark jobs and repeated shuffle stages to the number of actions.
C:Review predicate location in `explain()` and compare shuffle bytes. The case requires a discriminating check before any change, not the offered alternative. Use: Compare number of Spark jobs and repeated shuffle stages to the number of actions.
D:Compare sample results with distributed invalid-row counts and error summaries. The case requires a discriminating check before any change, not the offered alternative. Use: Compare number of Spark jobs and repeated shuffle stages to the number of actions.
Question 159
At Cloudhaven Apps, during a distributed-job recovery test (fictional study case R280-C032-2), a pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. 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 plan and the real result are verified by appropriate separate checks.
- Intended rows are preserved and avoidable upstream work is reduced.
- The pipeline returns the same totals with fewer redundant computations.
- A full distributed validation reports defects beyond the displayed sample.
Explanation
Correct Answer
C:A passing check shows: The pipeline returns the same totals with fewer redundant computations. This is evidence for the scoped change: Reduce unnecessary diagnostic actions or selectively cache the reused validated intermediate.
Incorrect Answers
A:The plan and the real result are verified by appropriate separate checks. The alternative cannot demonstrate that the issue has been corrected: A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. The required result is: The pipeline returns the same totals with fewer redundant computations.
B:Intended rows are preserved and avoidable upstream work is reduced. The alternative cannot demonstrate that the issue has been corrected: A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. The required result is: The pipeline returns the same totals with fewer redundant computations.
D:A full distributed validation reports defects beyond the displayed sample. Implementation or a check alone is not proof of success. The measurable end state is: The pipeline returns the same totals with fewer redundant computations.
Question 160
At Bayshore Healthcare, while reconciling a reporting dataset (fictional study case R280-C032-1), a pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. 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.
- Preserve separation of plan diagnostics from data validation.
- Optimize only the affected filter/join chain.
- Add validation logic without unbounded collection to the driver.
- Limit caching and action reduction to the repeated lineage.
Explanation
Correct Answer
D:The approved limit is: Limit caching and action reduction to the repeated lineage. It avoids applying the corrective step beyond the stated failure: A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins.
Incorrect Answers
A:Preserve separation of plan diagnostics from data validation. The action does not preserve the identified scope boundary: Limit caching and action reduction to the repeated lineage.
B:Optimize only the affected filter/join chain. It is not the bounded choice for the stated condition: A pipeline invokes `count()` in a loop to check each incremental transform and repeatedly re-runs costly upstream joins. The permitted change must remain: Limit caching and action reduction to the repeated lineage.
C:Add validation logic without unbounded collection to the driver. The action does not preserve the identified scope boundary: Limit caching and action reduction to the repeated lineage.