professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
A data engineering team runs business-critical Apache Spark batch processing workloads on a Google Cloud Dataproc cluster. The team observes two main operational issues:
Which configuration should the data engineering team implement to resolve both issues?
Set the Dataproc autoscaling policy scaleUpFactor to 0.05, disable Spark dynamic allocation, and configure yarn.nodemanager.resource.memory-mb to reserve 50% of node memory for the page cache.
Set the Dataproc autoscaling policy scaleUpFactor to 1.0, enable spark.streaming.dynamicAllocation.enabled, and configure spark.executor.instances to a static value.
Set the Dataproc autoscaling policy scaleUpFactor to 1.0, maintain Spark dynamic allocation enabled, and configure spark.dynamicAllocation.cachedExecutorIdleTimeout.
Set the Dataproc autoscaling policy scaleUpFactor to 0.1, keep default executor idle timeouts, and increase mapreduce.job.reduce.slowstart.completedmaps to 1.0.
Set the Dataproc autoscaling policy scaleUpFactor to 0.05, disable Spark dynamic allocation, and configure yarn.nodemanager.resource.memory-mb to reserve 50% of node memory for the page cache.
Set the Dataproc autoscaling policy scaleUpFactor to 1.0, enable spark.streaming.dynamicAllocation.enabled, and configure spark.executor.instances to a static value.
Set the Dataproc autoscaling policy scaleUpFactor to 1.0, maintain Spark dynamic allocation enabled, and configure spark.dynamicAllocation.cachedExecutorIdleTimeout.
Dataproc autoscaling pairs with Spark Dynamic Allocation to dynamically adjust cluster compute capacity based on workload demands. In Apache Spark, dynamic allocation requests YARN containers to host Spark executors when tasks backlog, starting with a baseline executor pool and doubling container allocations while unassigned tasks remain. Setting a responsive autoscaling policy allows Dataproc to translate these pending YARN resource requests into physical Compute Engine worker nodes immediately.
scaleUpFactor to 1.0 (100%) instructs Dataproc to aggressively provision nodes for 100% of pending YARN memory requests on every evaluation cycle.spark.dynamicAllocation.cachedExecutorIdleTimeout allows Spark to safely release idle executors even if they contain cached partitions, enabling Dataproc autoscaling to scale down nodes when resources become available.Unlike MapReduce jobs—which submit all map container requests simultaneously and require low scale-up factors (5–10%) to prevent overprovisioning—Spark manages task scheduling incrementally. A high scaleUpFactor of 1.0 combined with cached executor idle timeouts ensures maximum elasticity in both directions.
Set the Dataproc autoscaling policy scaleUpFactor to 0.1, keep default executor idle timeouts, and increase mapreduce.job.reduce.slowstart.completedmaps to 1.0.