Copy this object
Copy this object
Does the configuration contain a given parameter?
Get a parameter, falling back to a default if not set
Get a parameter; throws a NoSuchElementException if it's not set
Get all parameters as a list of pairs
Get all parameters that start with prefix
Returns the Spark application id, valid in the Driver after TaskScheduler registration and from the start in the Executor.
Gets all the avro schemas in the configuration used in the generic Avro record serializer
Get a parameter as a boolean, falling back to a default if not set
Get a parameter as a boolean, falling back to a default if not set
IllegalArgumentException
If the value cannot be interpreted as a boolean
Get a parameter as a double, falling back to a default if not ste
Get a parameter as a double, falling back to a default if not ste
NumberFormatException
If the value cannot be interpreted as a double
Get all executor environment variables set on this SparkConf
Get a parameter as an integer, falling back to a default if not set
Get a parameter as an integer, falling back to a default if not set
NumberFormatException
If the value cannot be interpreted as an integer
Get a parameter as a long, falling back to a default if not set
Get a parameter as a long, falling back to a default if not set
NumberFormatException
If the value cannot be interpreted as a long
Get a parameter as an Option
Get a size parameter as bytes, falling back to a default if not set.
Get a size parameter as bytes, falling back to a default if not set.
NumberFormatException
If the value cannot be interpreted as bytes
Get a size parameter as bytes, falling back to a default if not set.
Get a size parameter as bytes, falling back to a default if not set. If no suffix is provided then bytes are assumed.
NumberFormatException
If the value cannot be interpreted as bytes
Get a size parameter as bytes; throws a NoSuchElementException if it's not set.
Get a size parameter as bytes; throws a NoSuchElementException if it's not set. If no suffix is provided then bytes are assumed.
NumberFormatException
If the value cannot be interpreted as bytes
java.util.NoSuchElementException
If the size parameter is not set
Get a size parameter as Gibibytes, falling back to a default if not set.
Get a size parameter as Gibibytes, falling back to a default if not set. If no suffix is provided then Gibibytes are assumed.
NumberFormatException
If the value cannot be interpreted as Gibibytes
Get a size parameter as Gibibytes; throws a NoSuchElementException if it's not set.
Get a size parameter as Gibibytes; throws a NoSuchElementException if it's not set. If no suffix is provided then Gibibytes are assumed.
NumberFormatException
If the value cannot be interpreted as Gibibytes
java.util.NoSuchElementException
If the size parameter is not set
Get a size parameter as Kibibytes, falling back to a default if not set.
Get a size parameter as Kibibytes, falling back to a default if not set. If no suffix is provided then Kibibytes are assumed.
NumberFormatException
If the value cannot be interpreted as Kibibytes
Get a size parameter as Kibibytes; throws a NoSuchElementException if it's not set.
Get a size parameter as Kibibytes; throws a NoSuchElementException if it's not set. If no suffix is provided then Kibibytes are assumed.
NumberFormatException
If the value cannot be interpreted as Kibibytes
java.util.NoSuchElementException
If the size parameter is not set
Get a size parameter as Mebibytes, falling back to a default if not set.
Get a size parameter as Mebibytes, falling back to a default if not set. If no suffix is provided then Mebibytes are assumed.
NumberFormatException
If the value cannot be interpreted as Mebibytes
Get a size parameter as Mebibytes; throws a NoSuchElementException if it's not set.
Get a size parameter as Mebibytes; throws a NoSuchElementException if it's not set. If no suffix is provided then Mebibytes are assumed.
NumberFormatException
If the value cannot be interpreted as Mebibytes
java.util.NoSuchElementException
If the size parameter is not set
Get a time parameter as milliseconds, falling back to a default if not set.
Get a time parameter as milliseconds, falling back to a default if not set. If no suffix is provided then milliseconds are assumed.
NumberFormatException
If the value cannot be interpreted as milliseconds
Get a time parameter as milliseconds; throws a NoSuchElementException if it's not set.
Get a time parameter as milliseconds; throws a NoSuchElementException if it's not set. If no suffix is provided then milliseconds are assumed.
NumberFormatException
If the value cannot be interpreted as milliseconds
java.util.NoSuchElementException
If the time parameter is not set
Get a time parameter as seconds, falling back to a default if not set.
Get a time parameter as seconds, falling back to a default if not set. If no suffix is provided then seconds are assumed.
NumberFormatException
If the value cannot be interpreted as seconds
Get a time parameter as seconds; throws a NoSuchElementException if it's not set.
Get a time parameter as seconds; throws a NoSuchElementException if it's not set. If no suffix is provided then seconds are assumed.
NumberFormatException
If the value cannot be interpreted as seconds
java.util.NoSuchElementException
If the time parameter is not set
Use Kryo serialization and register the given set of Avro schemas so that the generic record serializer can decrease network IO
Use Kryo serialization and register the given set of classes with Kryo.
Use Kryo serialization and register the given set of classes with Kryo. If called multiple times, this will append the classes from all calls together.
Remove a parameter from the configuration
Set a configuration variable.
Set multiple parameters together
Set a name for your application.
Set a name for your application. Shown in the Spark web UI.
Set multiple environment variables to be used when launching executors.
Set multiple environment variables to be used when launching executors. (Java-friendly version.)
Set multiple environment variables to be used when launching executors.
Set multiple environment variables to be used when launching executors. These variables are stored as properties of the form spark.executorEnv.VAR_NAME (for example spark.executorEnv.PATH) but this method makes them easier to set.
Set an environment variable to be used when launching executors for this application.
Set an environment variable to be used when launching executors for this application. These variables are stored as properties of the form spark.executorEnv.VAR_NAME (for example spark.executorEnv.PATH) but this method makes them easier to set.
Set a parameter if it isn't already configured
Set JAR files to distribute to the cluster.
Set JAR files to distribute to the cluster. (Java-friendly version.)
Set JAR files to distribute to the cluster.
The master URL to connect to, such as "local" to run locally with one thread, "local[4]" to run locally with 4 cores, or "spark://master:7077" to run on a Spark standalone cluster.
Set the location where Spark is installed on worker nodes.
Return a string listing all keys and values, one per line.
Return a string listing all keys and values, one per line. This is useful to print the configuration out for debugging.
Configuration for a Spark application. Used to set various Spark parameters as key-value pairs.
Most of the time, you would create a SparkConf object with
new SparkConf()
, which will load values from anyspark.*
Java system properties set in your application as well. In this case, parameters you set directly on theSparkConf
object take priority over system properties.For unit tests, you can also call
new SparkConf(false)
to skip loading external settings and get the same configuration no matter what the system properties are.All setter methods in this class support chaining. For example, you can write
new SparkConf().setMaster("local").setAppName("My app")
.Once a SparkConf object is passed to Spark, it is cloned and can no longer be modified by the user. Spark does not support modifying the configuration at runtime.