Package org.apache.spark.sql
Class RuntimeConfig
Object
org.apache.spark.sql.RuntimeConfig
Runtime configuration interface for Spark. To access this, use
SparkSession.conf
.
Options set here are automatically propagated to the Hadoop configuration during I/O.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
Returns the value of Spark runtime configuration property for the given key.abstract String
Returns the value of Spark runtime configuration property for the given key.getAll()
Returns all properties set in this conf.abstract scala.Option<String>
Returns the value of Spark runtime configuration property for the given key.abstract boolean
isModifiable
(String key) Indicates whether the configuration property with the given key is modifiable in the current session.void
Sets the given Spark runtime configuration property.void
Sets the given Spark runtime configuration property.abstract void
Sets the given Spark runtime configuration property.abstract void
Resets the configuration property for the given key.
-
Constructor Details
-
RuntimeConfig
public RuntimeConfig()
-
-
Method Details
-
get
Returns the value of Spark runtime configuration property for the given key. If the key is not set yet, return its default value if possible, otherwiseNoSuchElementException
will be thrown.- Parameters:
key
- (undocumented)- Returns:
- (undocumented)
- Throws:
NoSuchElementException
- if the key is not set and does not have a default value- Since:
- 2.0.0
-
get
Returns the value of Spark runtime configuration property for the given key. If the key is not set yet, return the user givendefault
. This is useful when its default value defined by Apache Spark is not the desired one.- Parameters:
key
- (undocumented)default_
- (undocumented)- Returns:
- (undocumented)
- Since:
- 2.0.0
-
getAll
Returns all properties set in this conf.- Returns:
- (undocumented)
- Since:
- 2.0.0
-
getOption
Returns the value of Spark runtime configuration property for the given key. If the key is not set yet, return its default value if possible, otherwiseNone
will be returned.- Parameters:
key
- (undocumented)- Returns:
- (undocumented)
- Since:
- 2.0.0
-
isModifiable
Indicates whether the configuration property with the given key is modifiable in the current session.- Parameters:
key
- (undocumented)- Returns:
true
if the configuration property is modifiable. For static SQL, Spark Core, invalid (not existing) and other non-modifiable configuration properties, the returned value isfalse
.- Since:
- 2.4.0
-
set
Sets the given Spark runtime configuration property.- Parameters:
key
- (undocumented)value
- (undocumented)- Since:
- 2.0.0
-
set
Sets the given Spark runtime configuration property.- Parameters:
key
- (undocumented)value
- (undocumented)- Since:
- 2.0.0
-
set
Sets the given Spark runtime configuration property.- Parameters:
key
- (undocumented)value
- (undocumented)- Since:
- 2.0.0
-
unset
Resets the configuration property for the given key.- Parameters:
key
- (undocumented)- Since:
- 2.0.0
-