Complete the code to set the Spark executor memory to 4 gigabytes.
spark.conf.set("spark.executor.memory", "[1]")
The correct way to set executor memory is using '4g' for 4 gigabytes.
Complete the code to trigger garbage collection manually in Spark's JVM.
System.[1]()Calling System.gc() requests JVM to perform garbage collection.
Fix the error in the Spark configuration to enable dynamic allocation of executors.
spark.conf.set("spark.dynamicAllocation.[1]", "true")
The correct property name is 'spark.dynamicAllocation.enabled' to enable dynamic allocation.
Fill both blanks to configure Spark to use a specific garbage collector and set its pause time.
spark.conf.set("spark.executor.extraJavaOptions", "-XX:+Use[1]GC -XX:MaxGCPauseMillis=[2]")
Use '-XX:+UseG1GC' to select the G1 garbage collector and set max pause time to 100 ms.
Fill all three blanks to create a Spark configuration dictionary that sets executor memory, enables dynamic allocation, and sets shuffle partitions.
{"spark.executor.memory": "[1]", "spark.dynamicAllocation.enabled": "[2]", "spark.sql.shuffle.partitions": "[3]"}This dictionary sets executor memory to 8 GB, enables dynamic allocation, and sets shuffle partitions to 200.
