Package org.apache.spark
Interface ReadOnlySparkConf
- All Known Implementing Classes:
- SparkConf
public interface ReadOnlySparkConf
- 
Method SummaryModifier and TypeMethodDescription<T> TcatchIllegalValue(String key, scala.Function0<T> getValue) Wrapper method for get() methods which require some specific value format.booleanDoes the configuration contain a given parameter?booleancontains(org.apache.spark.internal.config.ConfigEntry<?> entry) Does the configuration have the typed config entry?Get a parameter; throws a NoSuchElementException if it's not setGet a parameter, falling back to a default if not set<T> Tget(org.apache.spark.internal.config.ConfigEntry<T> entry) Retrieves the value of a pre-defined configuration entry.getAll()Get all parameters as a list of pairsbooleangetBoolean(String key, boolean defaultValue) Get a parameter as a boolean, falling back to a default if not setdoubleGet a parameter as a double, falling back to a default if not steBy using this instead of System.getenv(), environment variables can be mocked in unit tests.intGet a parameter as an integer, falling back to a default if not setlongGet a parameter as a long, falling back to a default if not setscala.Option<String>Get a parameter as an OptionlonggetSizeAsBytes(String key) Get a size parameter as bytes; throws a NoSuchElementException if it's not set.longgetSizeAsBytes(String key, long defaultValue) Get a size parameter as bytes, falling back to a default if not set.longgetSizeAsBytes(String key, String defaultValue) Get a size parameter as bytes, falling back to a default if not set.longgetSizeAsGb(String key) Get a size parameter as Gibibytes; throws a NoSuchElementException if it's not set.longgetSizeAsGb(String key, String defaultValue) Get a size parameter as Gibibytes, falling back to a default if not set.longgetSizeAsKb(String key) Get a size parameter as Kibibytes; throws a NoSuchElementException if it's not set.longgetSizeAsKb(String key, String defaultValue) Get a size parameter as Kibibytes, falling back to a default if not set.longgetSizeAsMb(String key) Get a size parameter as Mebibytes; throws a NoSuchElementException if it's not set.longgetSizeAsMb(String key, String defaultValue) Get a size parameter as Mebibytes, falling back to a default if not set.longgetTimeAsMs(String key) Get a time parameter as milliseconds; throws a NoSuchElementException if it's not set.longgetTimeAsMs(String key, String defaultValue) Get a time parameter as milliseconds, falling back to a default if not set.longgetTimeAsSeconds(String key) Get a time parameter as seconds; throws a NoSuchElementException if it's not set.longgetTimeAsSeconds(String key, String defaultValue) Get a time parameter as seconds, falling back to a default if not set.
- 
Method Details- 
catchIllegalValueWrapper method for get() methods which require some specific value format. This catches anyNumberFormatExceptionorIllegalArgumentExceptionand re-raises it with the incorrectly configured key in the exception message.- Parameters:
- key- (undocumented)
- getValue- (undocumented)
- Returns:
- (undocumented)
 
- 
containsDoes the configuration contain a given parameter?
- 
containsboolean contains(org.apache.spark.internal.config.ConfigEntry<?> entry) Does the configuration have the typed config entry?
- 
getGet a parameter; throws a NoSuchElementException if it's not set
- 
getGet a parameter, falling back to a default if not set
- 
get<T> T get(org.apache.spark.internal.config.ConfigEntry<T> entry) Retrieves the value of a pre-defined configuration entry.- This is an internal Spark API. - The return type if defined by the configuration entry. - This will throw an exception is the config is not optional and the value is not set. - Parameters:
- entry- (undocumented)
- Returns:
- (undocumented)
 
- 
getAllGet all parameters as a list of pairs
- 
getBooleanGet a parameter as a boolean, falling back to a default if not set- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- IllegalArgumentException- If the value cannot be interpreted as a boolean
 
- 
getDoubleGet a parameter as a double, falling back to a default if not ste- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as a double
 
- 
getIntGet a parameter as an integer, falling back to a default if not set- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as an integer
 
- 
getLongGet a parameter as a long, falling back to a default if not set- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as a long
 
- 
getOptionGet a parameter as an Option
- 
getSizeAsBytesGet a size parameter as bytes; throws a NoSuchElementException if it's not set. If no suffix is provided then bytes are assumed.- Parameters:
- key- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NoSuchElementException- If the size parameter is not set
- NumberFormatException- If the value cannot be interpreted as bytes
 
- 
getSizeAsBytesGet a size parameter as bytes, falling back to a default if not set. If no suffix is provided then bytes are assumed.- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as bytes
 
- 
getSizeAsBytesGet a size parameter as bytes, falling back to a default if not set.- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as bytes
 
- 
getSizeAsGbGet a size parameter as Gibibytes; throws a NoSuchElementException if it's not set. If no suffix is provided then Gibibytes are assumed.- Parameters:
- key- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NoSuchElementException- If the size parameter is not set
- NumberFormatException- If the value cannot be interpreted as Gibibytes
 
- 
getSizeAsGbGet a size parameter as Gibibytes, falling back to a default if not set. If no suffix is provided then Gibibytes are assumed.- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as Gibibytes
 
- 
getSizeAsKbGet a size parameter as Kibibytes; throws a NoSuchElementException if it's not set. If no suffix is provided then Kibibytes are assumed.- Parameters:
- key- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NoSuchElementException- If the size parameter is not set
- NumberFormatException- If the value cannot be interpreted as Kibibytes
 
- 
getSizeAsKbGet a size parameter as Kibibytes, falling back to a default if not set. If no suffix is provided then Kibibytes are assumed.- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as Kibibytes
 
- 
getSizeAsMbGet a size parameter as Mebibytes; throws a NoSuchElementException if it's not set. If no suffix is provided then Mebibytes are assumed.- Parameters:
- key- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NoSuchElementException- If the size parameter is not set
- NumberFormatException- If the value cannot be interpreted as Mebibytes
 
- 
getSizeAsMbGet a size parameter as Mebibytes, falling back to a default if not set. If no suffix is provided then Mebibytes are assumed.- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as Mebibytes
 
- 
getTimeAsMsGet a time parameter as milliseconds; throws a NoSuchElementException if it's not set. If no suffix is provided then milliseconds are assumed.- Parameters:
- key- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NoSuchElementException- If the time parameter is not set
- NumberFormatException- If the value cannot be interpreted as milliseconds
 
- 
getTimeAsMsGet a time parameter as milliseconds, falling back to a default if not set. If no suffix is provided then milliseconds are assumed.- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as milliseconds
 
- 
getTimeAsSecondsGet a time parameter as seconds; throws a NoSuchElementException if it's not set. If no suffix is provided then seconds are assumed.- Parameters:
- key- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NoSuchElementException- If the time parameter is not set
- NumberFormatException- If the value cannot be interpreted as seconds
 
- 
getTimeAsSecondsGet a time parameter as seconds, falling back to a default if not set. If no suffix is provided then seconds are assumed.- Parameters:
- key- (undocumented)
- defaultValue- (undocumented)
- Returns:
- (undocumented)
- Throws:
- NumberFormatException- If the value cannot be interpreted as seconds
 
- 
getenvBy using this instead of System.getenv(), environment variables can be mocked in unit tests.- Parameters:
- name- (undocumented)
- Returns:
- (undocumented)
 
 
-