How to Migrate Apache Spark Jobs to Google Cloud
You want to migrate an Apache Spark 3 batch job from on-premises to Google Cloud. You need to minimally change the job so that the job reads from Cloud Storage and writes the result to BigQuery. Your job is optimized for Spark, where each executor has 8 vCPU and 16 GB memory, and you want to be able to choose similar settings. You want to minimize installation and management effort to run your job. What should you do?
Community Votes
69% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests the trade-off between infrastructure control and operational effort, with the trap being the assumption that Dataproc Serverless cannot match specific executor resource requirements.
Dataproc Serverless is the preferred solution for migrating Spark batch jobs when minimizing management overhead is the priority, as it allows resource configuration without the need to manage cluster infrastructure.
Selecting a standard Dataproc cluster (Option C) due to the belief that Serverless does not allow granular configuration of vCPU and memory per executor.
Community Discussion (7 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Dataproc Serverless is designed specifically to run Spark jobs without the need to provision or manage clusters, directly addressing the requirement to minimize installation and management effort. It allows users to specify executor resources using standard Spark properties (likespark.executor.cores and spark.executor.memory), enabling the configuration of 8 vCPUs and 16 GB of memory as required.Why the Other Options Are Wrong
Options A (GKE) and B (Compute Engine) require significant manual setup and ongoing management of the underlying infrastructure, violating the constraint to minimize effort. Option C (Dataproc Cluster) offers full control but requires managing the cluster lifecycle (creation, scaling, deletion), which involves more operational overhead than the serverless alternative.Community Comment Notes
Community members debated the configurability of Serverless, with some noting it does not allow selecting specific machine types (Comment 4). However, top-rated comments clarified that resource settings like vCPU and memory can indeed be configured via properties (Comment 1), confirming Serverless meets the job's optimization needs while satisfying the management constraints.Official Reference
Exam Strategy
When a question emphasizes minimizing management or installation effort, prioritize serverless or fully managed services. Verify if specific technical constraints (like resource limits) can be met through configuration properties rather than direct infrastructure control.