Cloud Digital Leader Google Cloud Products and Services Practice Question
A company runs batch analytics jobs every night using Apache Spark on a cluster. The jobs require 100 vCPUs and run for 3 hours. The cluster must be created, run, and then shut down automatically to minimise cost. Which service should they use?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Cloud Dataproc
Cloud Dataproc is a managed Spark/Hadoop service that supports job-scoped clusters: you define a cluster configuration, submit a job, and the cluster is automatically deleted after completion. Compute Engine requires manual management. Dataflow is for Beam, not Spark. GKE is generic Kubernetes, not optimised for Spark batch jobs.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Cloud Dataflow
Why it's wrong here
Cloud Dataflow is a fully managed service for executing Apache Beam pipelines, not native Apache Spark workloads. Although it supports batch processing, it would require rewriting your Spark jobs into Beam translations using the Spark Runner compatibility layer, which is not a drop-in replacement and adds migration risk. For a nightly Spark batch job, Dataflow does not provide direct Spark runtime compatibility or the same cluster-based execution model.
- ✓
Cloud Dataproc
Why this is correct
Cloud Dataproc is Google Cloud's managed Spark and Hadoop service, purpose-built to run workloads like Apache Spark directly. You can create a job-scoped cluster that automatically terminates as soon as the batch job finishes, so you only incur compute costs while the job is running, which is ideal for nightly analytics that do not need a persistent cluster. Dataproc also supports custom machine types, preemptible/spot workers, and integration with Cloud Storage, BigQuery, and Cloud Monitoring, making it the lowest-effort, cost-optimized choice.
- ✗
Google Kubernetes Engine (GKE)
Why it's wrong here
While Google Kubernetes Engine (GKE) can run Apache Spark via the Spark-on-Kubernetes operator or by containerizing your jobs, it does not provide native auto-termination of the entire cluster after a single batch job. You must manage node pools, autoscaling, and cluster lifecycle manually, and the nodes remain active until you explicitly delete them or configured autoscaling scales them down. That operational overhead and the risk of idle compute costs make GKE a less suitable choice for a simple nightly Spark batch job compared to Dataproc.
- ✗
Compute Engine with managed instance groups
Why it's wrong here
A managed instance group (MIG) is designed to maintain a fixed number of VM instances or to autoscale based on load, not to run ephemeral analytics clusters. To use it for Spark, you would have to manually install and configure Spark on each VM, coordinate a master and workers, and write separate scripts to shut down all instances after the job completes — something MIGs do not natively support. This approach lacks the integrated job scheduling and automatic cluster deletion of Dataproc, leading to high operational complexity and potential orphaned VMs.
Go deeper
Related to this question
Learn chapter
Cloud Digital Transformation
Key term
Anthos
Anthos is a Google Cloud platform that lets you run applications consistently across different computing environments, like on-premises data centers and multiple public clouds.
Key term
Dataflow
Dataflow is a Google Cloud managed service that processes and transforms data in real-time or batch mode using Apache Beam pipelines.
About these practice questions
One of 829 original GCDL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This GCDL practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GCDL exam.