Class RuntimeConfig

Object
org.apache.spark.sql.RuntimeConfig

public class RuntimeConfig extends Object
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
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String key)
    Returns the value of Spark runtime configuration property for the given key.
    get(String key, String default_)
    Returns the value of Spark runtime configuration property for the given key.
    scala.collection.immutable.Map<String,String>
    Returns all properties set in this conf.
    scala.Option<String>
    Returns the value of Spark runtime configuration property for the given key.
    boolean
    Indicates whether the configuration property with the given key is modifiable in the current session.
    void
    set(String key, boolean value)
    Sets the given Spark runtime configuration property.
    void
    set(String key, long value)
    Sets the given Spark runtime configuration property.
    void
    set(String key, String value)
    Sets the given Spark runtime configuration property.
    void
    Resets the configuration property for the given key.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • set

      public void set(String key, String value)
      Sets the given Spark runtime configuration property.

      Parameters:
      key - (undocumented)
      value - (undocumented)
      Since:
      2.0.0
    • set

      public void set(String key, boolean value)
      Sets the given Spark runtime configuration property.

      Parameters:
      key - (undocumented)
      value - (undocumented)
      Since:
      2.0.0
    • set

      public void set(String key, long value)
      Sets the given Spark runtime configuration property.

      Parameters:
      key - (undocumented)
      value - (undocumented)
      Since:
      2.0.0
    • get

      public String get(String key) throws NoSuchElementException
      Returns the value of Spark runtime configuration property for the given key.

      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

      public String get(String key, String default_)
      Returns the value of Spark runtime configuration property for the given key.

      Parameters:
      key - (undocumented)
      default_ - (undocumented)
      Returns:
      (undocumented)
      Since:
      2.0.0
    • getAll

      public scala.collection.immutable.Map<String,String> getAll()
      Returns all properties set in this conf.

      Returns:
      (undocumented)
      Since:
      2.0.0
    • getOption

      public scala.Option<String> getOption(String key)
      Returns the value of Spark runtime configuration property for the given key.

      Parameters:
      key - (undocumented)
      Returns:
      (undocumented)
      Since:
      2.0.0
    • unset

      public void unset(String key)
      Resets the configuration property for the given key.

      Parameters:
      key - (undocumented)
      Since:
      2.0.0
    • isModifiable

      public boolean isModifiable(String key)
      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 is false.
      Since:
      2.4.0