0
0
Apache Sparkdata~10 mins

Google Dataproc overview in Apache Spark - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a Dataproc cluster using the Google Cloud SDK.

Apache Spark
gcloud dataproc clusters create [1] --region=us-central1 --single-node
Drag options to blanks, or click blank then click option'
Amy-cluster
Bcreate-cluster
Cdataproc-cluster
Dcluster-1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a command keyword instead of a cluster name.
Including spaces in the cluster name.
2fill in blank
medium

Complete the code to submit a PySpark job to the Dataproc cluster.

Apache Spark
gcloud dataproc jobs submit pyspark [1] --cluster=my-cluster --region=us-central1
Drag options to blanks, or click blank then click option'
Amain.py
Bscript.sh
Cjob.py
Djob.jar
Attempts:
3 left
💡 Hint
Common Mistakes
Using a shell script or Java jar file instead of a Python script.
Incorrect file extension.
3fill in blank
hard

Fix the error in the code to list all Dataproc clusters in a region.

Apache Spark
gcloud dataproc clusters list --region=[1]
Drag options to blanks, or click blank then click option'
Aus-central1
Bcentral1
Cus-central
Dus_central1
Attempts:
3 left
💡 Hint
Common Mistakes
Using underscores instead of hyphens.
Omitting part of the region name.
4fill in blank
hard

Fill both blanks to create a Dataproc cluster with 3 worker nodes and specify the machine type.

Apache Spark
gcloud dataproc clusters create my-cluster --region=us-central1 --num-workers=[1] --worker-machine-type=[2]
Drag options to blanks, or click blank then click option'
A3
Bn1-standard-4
Cn1-standard-1
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using too few or too many workers.
Choosing an invalid machine type.
5fill in blank
hard

Fill all three blanks to create a cluster with autoscaling enabled and specify the autoscaling policy.

Apache Spark
gcloud dataproc clusters create my-cluster --region=us-central1 --autoscaling-policy=[1] --num-preemptible-workers=[2] --worker-machine-type=[3]
Drag options to blanks, or click blank then click option'
Amy-autoscale-policy
B2
Cn1-standard-2
Ddefault-policy
Attempts:
3 left
💡 Hint
Common Mistakes
Using an incorrect policy name.
Setting preemptible workers to zero or too high.
Choosing an unsupported machine type.