Refer to the exhibit. Which action is the most appropriate to resolve this memory-related failure during the job execution?
Upgrading to a memory-optimized instance family directly addresses the physical memory constraint identified in the logs. By increasing the memory allocated to each container, the executors can accommodate the memory footprint required for the transformation, preventing the container from being killed by the underlying resource manager.
Why this answer
The error indicates an Out of Memory (OOM) condition where the container exceeded its allocated memory limit. Increasing the instance type to a memory-optimized VM size provides more RAM per executor, allowing Spark to process larger partitions without triggering the YARN memory killer. This is a common bottleneck in memory-intensive operations like wide transformations, where adjusting the cluster configuration is more effective than attempting to optimize complex query logic.
Exam trap
Candidates frequently try to solve memory errors by tuning Spark shuffle partitions or changing code logic, ignoring that an outright hardware memory ceiling requires a memory-optimized instance type.