Certified Associate Developer for Apache Spark Practice Test 8
Question 70
At Elmwood Manufacturing, while optimizing an ETL application (fictional study case R280-C014-1), a DataFrame repeatedly scans the same source even though developers expected caching from assigning it to a Python variable. 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.
- Retune only the oversized cached intermediate.
- Limit conversion to small samples if local pandas is genuinely required.
- Persist only the repeatedly reused intermediate dataset.
- Optimize memory representation and cache usage in the affected stage.
Explanation
Correct Answer
C:The approved limit is: Persist only the repeatedly reused intermediate dataset. It avoids applying the corrective step beyond the stated failure: A DataFrame repeatedly scans the same source even though developers expected caching from assigning it to a Python variable.
Incorrect Answers
A:Retune only the oversized cached intermediate. The action does not preserve the identified scope boundary: Persist only the repeatedly reused intermediate dataset.
B:Limit conversion to small samples if local pandas is genuinely required. It is not the bounded choice for the stated condition: A DataFrame repeatedly scans the same source even though developers expected caching from assigning it to a Python variable. The permitted change must remain: Persist only the repeatedly reused intermediate dataset.
D:Optimize memory representation and cache usage in the affected stage. The action does not preserve the identified scope boundary: Persist only the repeatedly reused intermediate dataset.
Question 71
At Lakeside Devices, after a Spark runtime upgrade (fictional study case R280-C015-1), a cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. 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 supported PySpark DataFrame filtering, ordering and selection methods or explicitly convert only a bounded sample.
- Reduce retained rows or columns, use efficient encodings and size cache/executor memory based on profiling.
- Choose an appropriate memory-and-disk storage level or reduce cached columns based on reuse and capacity.
- Unpersist or refresh the affected cached table/DataFrame before running the updated reporting query.
Explanation
Correct Answer
C:The observed defect follows from: The selected persistence storage level and dataset size exceed the available executor memory. The appropriate correction is: Choose an appropriate memory-and-disk storage level or reduce cached columns based on reuse and capacity. Confirm the result by verifying: Repeated actions retain performance without sustained memory pressure.
Incorrect Answers
A:Use supported PySpark DataFrame filtering, ordering and selection methods or explicitly convert only a bounded sample. The option targets a different stage or condition. The relevant failure is: The selected persistence storage level and dataset size exceed the available executor memory. The needed repair is: Choose an appropriate memory-and-disk storage level or reduce cached columns based on reuse and capacity.
B:Reduce retained rows or columns, use efficient encodings and size cache/executor memory based on profiling. The recorded mechanism is: The selected persistence storage level and dataset size exceed the available executor memory. The proposed action does not correct that mechanism; use: Choose an appropriate memory-and-disk storage level or reduce cached columns based on reuse and capacity.
D:Unpersist or refresh the affected cached table/DataFrame before running the updated reporting query. The option targets a different stage or condition. The relevant failure is: The selected persistence storage level and dataset size exceed the available executor memory. The needed repair is: Choose an appropriate memory-and-disk storage level or reduce cached columns based on reuse and capacity.
Question 72
At Bayfront Markets, when validating a daily batch (fictional study case R280-C015-2), a cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. 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.
- Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs.
- The selected persistence storage level and dataset size exceed the available executor memory.
- Excessive live objects and cache footprint induce JVM garbage-collection overhead instead of productive computation.
- Cache lifecycle was not invalidated when source data changed and the relation continues serving persisted partitions.
Explanation
Correct Answer
B:The reported symptom is: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. Its direct cause is: The selected persistence storage level and dataset size exceed the available executor memory. Test that conclusion using: Inspect block storage levels, evictions, GC pauses and spill behavior.
Incorrect Answers
A:Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs. The observed failure instead follows from: The selected persistence storage level and dataset size exceed the available executor memory. The alternative does not explain the same dependency.
C:Excessive live objects and cache footprint induce JVM garbage-collection overhead instead of productive computation. This is not the root cause established for the reported condition: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. The cause is: The selected persistence storage level and dataset size exceed the available executor memory.
D:Cache lifecycle was not invalidated when source data changed and the relation continues serving persisted partitions. The observed failure instead follows from: The selected persistence storage level and dataset size exceed the available executor memory. The alternative does not explain the same dependency.
Question 73
At Orion Fintech, when reviewing an incremental load (fictional study case R280-C015-1), a cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. 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.
- Confirm the object type and inspect the requested operation in the Spark Python API.
- Correlate executor GC time with heap occupancy and cached block sizes.
- Compare source file modification with cache Storage tab state and query results.
- Inspect block storage levels, evictions, GC pauses and spill behavior.
Explanation
Correct Answer
D:Inspect block storage levels, evictions, GC pauses and spill behavior. This gathers evidence about the stated mechanism: The selected persistence storage level and dataset size exceed the available executor memory. The existing symptom is: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation.
Incorrect Answers
A:Confirm the object type and inspect the requested operation in the Spark Python API. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Inspect block storage levels, evictions, GC pauses and spill behavior.
B:Correlate executor GC time with heap occupancy and cached block sizes. That does not establish whether the stated cause is present: The selected persistence storage level and dataset size exceed the available executor memory. The diagnostic is: Inspect block storage levels, evictions, GC pauses and spill behavior.
C:Compare source file modification with cache Storage tab state and query results. That does not establish whether the stated cause is present: The selected persistence storage level and dataset size exceed the available executor memory. The diagnostic is: Inspect block storage levels, evictions, GC pauses and spill behavior.
Question 74
At Westfield Insights, before a production rollout (fictional study case R280-C015-2), a cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. 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 required selection runs on distributed data with deterministic ordering where needed.
- GC fraction declines while output remains unchanged.
- Fresh source rows appear after invalidation, with downstream counts reconciled.
- Repeated actions retain performance without sustained memory pressure.
Explanation
Correct Answer
D:Repeated actions retain performance without sustained memory pressure. This demonstrates the intended effect of: Choose an appropriate memory-and-disk storage level or reduce cached columns based on reuse and capacity. The prior failure was: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation.
Incorrect Answers
A:The required selection runs on distributed data with deterministic ordering where needed. Implementation or a check alone is not proof of success. The measurable end state is: Repeated actions retain performance without sustained memory pressure.
B:GC fraction declines while output remains unchanged. The alternative cannot demonstrate that the issue has been corrected: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. The required result is: Repeated actions retain performance without sustained memory pressure.
C:Fresh source rows appear after invalidation, with downstream counts reconciled. The alternative cannot demonstrate that the issue has been corrected: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. The required result is: Repeated actions retain performance without sustained memory pressure.
Question 75
At Mapleford Engineering, while optimizing an ETL application (fictional study case R280-C015-1), a cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. 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 conversion to small samples if local pandas is genuinely required.
- Optimize memory representation and cache usage in the affected stage.
- Retune only the oversized cached intermediate.
- Invalidate only affected cached relations, preserving unrelated caches.
Explanation
Correct Answer
C:The approved limit is: Retune only the oversized cached intermediate. It avoids applying the corrective step beyond the stated failure: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation.
Incorrect Answers
A:Limit conversion to small samples if local pandas is genuinely required. The action does not preserve the identified scope boundary: Retune only the oversized cached intermediate.
B:Optimize memory representation and cache usage in the affected stage. It is not the bounded choice for the stated condition: A cache choice stores a wide dataset entirely in RAM and evicts other useful partitions, increasing recomputation. The permitted change must remain: Retune only the oversized cached intermediate.
D:Invalidate only affected cached relations, preserving unrelated caches. This does not enforce the required scope: Retune only the oversized cached intermediate. The specific failure is: The selected persistence storage level and dataset size exceed the available executor memory.
Question 76
At Horizon Logistics, after a Spark runtime upgrade (fictional study case R280-C016-1), a developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. 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.
- Reduce retained rows or columns, use efficient encodings and size cache/executor memory based on profiling.
- Unpersist or refresh the affected cached table/DataFrame before running the updated reporting query.
- Inspect the existing session and configure supported runtime properties explicitly or start an appropriately isolated application.
- Use supported PySpark DataFrame filtering, ordering and selection methods or explicitly convert only a bounded sample.
Explanation
Correct Answer
D:The failure mechanism is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs. Apply the bounded change: Use supported PySpark DataFrame filtering, ordering and selection methods or explicitly convert only a bounded sample. The acceptance test must show: The required selection runs on distributed data with deterministic ordering where needed.
Incorrect Answers
A:Reduce retained rows or columns, use efficient encodings and size cache/executor memory based on profiling. The recorded mechanism is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs. The proposed action does not correct that mechanism; use: Use supported PySpark DataFrame filtering, ordering and selection methods or explicitly convert only a bounded sample.
B:Unpersist or refresh the affected cached table/DataFrame before running the updated reporting query. The option targets a different stage or condition. The relevant failure is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs. The needed repair is: Use supported PySpark DataFrame filtering, ordering and selection methods or explicitly convert only a bounded sample.
C:Inspect the existing session and configure supported runtime properties explicitly or start an appropriately isolated application. That would not resolve the reported problem: A developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. The source-supported intervention is: Use supported PySpark DataFrame filtering, ordering and selection methods or explicitly convert only a bounded sample.
Question 77
At Aspen Public Services, when validating a daily batch (fictional study case R280-C016-2), a developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. 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.
- Excessive live objects and cache footprint induce JVM garbage-collection overhead instead of productive computation.
- Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs.
- Cache lifecycle was not invalidated when source data changed and the relation continues serving persisted partitions.
- The method may reuse an active SparkSession, so later builder options do not necessarily reconstruct the running context.
Explanation
Correct Answer
B:The reported symptom is: A developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. Its direct cause is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs. Test that conclusion using: Confirm the object type and inspect the requested operation in the Spark Python API.
Incorrect Answers
A:Excessive live objects and cache footprint induce JVM garbage-collection overhead instead of productive computation. This is not the root cause established for the reported condition: A developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. The cause is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs.
C:Cache lifecycle was not invalidated when source data changed and the relation continues serving persisted partitions. That explanation needs evidence of another fault. The specific mechanism here is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs.
D:The method may reuse an active SparkSession, so later builder options do not necessarily reconstruct the running context. That explanation needs evidence of another fault. The specific mechanism here is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs.
Question 78
At Juniper Foods, when reviewing an incremental load (fictional study case R280-C016-1), a developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. 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.
- Correlate executor GC time with heap occupancy and cached block sizes.
- Confirm the object type and inspect the requested operation in the Spark Python API.
- Compare source file modification with cache Storage tab state and query results.
- Check SparkSession identity and effective configuration before and after the call.
Explanation
Correct Answer
B:Confirm the object type and inspect the requested operation in the Spark Python API. This gathers evidence about the stated mechanism: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs. The existing symptom is: A developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error.
Incorrect Answers
A:Correlate executor GC time with heap occupancy and cached block sizes. The case requires a discriminating check before any change, not the offered alternative. Use: Confirm the object type and inspect the requested operation in the Spark Python API.
C:Compare source file modification with cache Storage tab state and query results. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Confirm the object type and inspect the requested operation in the Spark Python API.
D:Check SparkSession identity and effective configuration before and after the call. This is not the focused evidence-gathering step. Verify the suspected mechanism with: Confirm the object type and inspect the requested operation in the Spark Python API.
Question 79
At Silverpeak Bioinformatics, before a production rollout (fictional study case R280-C016-2), a developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. 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.
- GC fraction declines while output remains unchanged.
- Fresh source rows appear after invalidation, with downstream counts reconciled.
- The required selection runs on distributed data with deterministic ordering where needed.
- The application uses exactly the intended effective settings and session boundary.
Explanation
Correct Answer
C:The verification result must be: The required selection runs on distributed data with deterministic ordering where needed. It is stronger evidence than merely performing: Confirm the object type and inspect the requested operation in the Spark Python API.
Incorrect Answers
A:GC fraction declines while output remains unchanged. The alternative cannot demonstrate that the issue has been corrected: A developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. The required result is: The required selection runs on distributed data with deterministic ordering where needed.
B:Fresh source rows appear after invalidation, with downstream counts reconciled. This is not the observed recovery outcome. Acceptance requires: The required selection runs on distributed data with deterministic ordering where needed.
D:The application uses exactly the intended effective settings and session boundary. The alternative cannot demonstrate that the issue has been corrected: A developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. The required result is: The required selection runs on distributed data with deterministic ordering where needed.
Question 80
At Willowbank Software, while optimizing an ETL application (fictional study case R280-C016-1), a developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. 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.
- Optimize memory representation and cache usage in the affected stage.
- Limit conversion to small samples if local pandas is genuinely required.
- Invalidate only affected cached relations, preserving unrelated caches.
- Constrain changes to session lifecycle for this application.
Explanation
Correct Answer
B:Limit conversion to small samples if local pandas is genuinely required. This limits the change while addressing: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs. The expected outcome is: The required selection runs on distributed data with deterministic ordering where needed.
Incorrect Answers
A:Optimize memory representation and cache usage in the affected stage. The action does not preserve the identified scope boundary: Limit conversion to small samples if local pandas is genuinely required.
C:Invalidate only affected cached relations, preserving unrelated caches. This does not enforce the required scope: Limit conversion to small samples if local pandas is genuinely required. The specific failure is: Spark DataFrames are distributed, lazily evaluated tabular relations, not in-memory pandas objects exposing identical APIs.
D:Constrain changes to session lifecycle for this application. It is not the bounded choice for the stated condition: A developer calls `.iloc` on a Spark DataFrame expecting pandas positional indexing and receives an attribute error. The permitted change must remain: Limit conversion to small samples if local pandas is genuinely required.