Apache Spark Certification 2025 – 400 Free Practice Questions to Pass the Exam

Disable ads (and more) with a premium pass for a one time $4.99 payment

Question: 1 / 345

How can you set the executor memory to 1g using SparkConf?

foo_conf.set("spark.executor.memory", "1g")

foo_conf.set("spark.executor.memory", "1GB")

foo_conf.set("spark.executor.mempry", "1g")

The correct way to set the executor memory to 1g using SparkConf is to use the method that directly uses the correct key for configuring executor memory. The appropriate key is "spark.executor.memory", and the syntax requires the value to be specified in gigabytes or other acceptable memory units, such as "1g" or "1GB".

In this case, the answer provided incorrectly refers to "spark.executor.mempry," which is a typographical error. The key must be spelled accurately for Spark to recognize it and apply the memory setting accordingly. The other options also contain errors, such as using incorrect value format or trying to configure a non-existent property. To set the executor memory properly, one must reference the correct configuration property name as documented in Spark's configuration guidelines and provide a valid memory size format.

Get further explanation with Examzify DeepDiveBeta

foo_conf.set("spark.executor.memory.value", "1g")

Next

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy