QuestionQ25

VerifiedProductionizing Data Pipelines

A data engineer is developing an ETL process based on Spark SQL. The execution fails. The data engineer checks the Spark UI and can see the ERRORS as follows:

"java.lang.OutofMemoryError: Java heap space"

Which two corrective actions should the data engineer perform to resolve this issue?

Choose two
Explanation

A Java heap space OutOfMemoryError generally means too much data is being processed or shuffled relative to the memory available, so narrowing filters to reduce the volume of data pulled into the query, and giving the cluster more capacity while letting Spark's auto-optimized shuffle dynamically size shuffle partitions to the actual data, both relieve that memory pressure. Simply caching the dataset adds further memory pressure rather than reducing it, and hardcoding a fixed, arbitrary shuffle-partition count does not adapt to the data volume causing the failure.

Community Discussion

No comments yet. Be the first to start the discussion!