Package org.apache.flink.python
Class PythonConfig
- java.lang.Object
-
- org.apache.flink.python.PythonConfig
-
- All Implemented Interfaces:
ReadableConfig
@Internal public class PythonConfig extends Object implements ReadableConfig
Configurations for the Python job which are used at run time.
-
-
Constructor Summary
Constructors Constructor Description PythonConfig(ReadableConfig configuration, ReadableConfig pythonDependencyConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
get(ConfigOption<T> option)
Reads a value using the metadata included inConfigOption
.<T> Optional<T>
getOptional(ConfigOption<T> option)
Reads a value using the metadata included inConfigOption
.Configuration
toConfiguration()
Map<String,String>
toMap()
Converts the configuration items into a map of string key-value pairs.
-
-
-
Constructor Detail
-
PythonConfig
public PythonConfig(ReadableConfig configuration, ReadableConfig pythonDependencyConfiguration)
-
-
Method Detail
-
get
public <T> T get(ConfigOption<T> option)
Description copied from interface:ReadableConfig
Reads a value using the metadata included inConfigOption
. Returns theConfigOption.defaultValue()
if value key not present in the configuration.- Specified by:
get
in interfaceReadableConfig
- Type Parameters:
T
- type of the value to read- Parameters:
option
- metadata of the option to read- Returns:
- read value or
ConfigOption.defaultValue()
if not found - See Also:
ReadableConfig.getOptional(ConfigOption)
-
getOptional
public <T> Optional<T> getOptional(ConfigOption<T> option)
Description copied from interface:ReadableConfig
Reads a value using the metadata included inConfigOption
. In contrast toReadableConfig.get(ConfigOption)
returnsOptional.empty()
if value not present.- Specified by:
getOptional
in interfaceReadableConfig
- Type Parameters:
T
- type of the value to read- Parameters:
option
- metadata of the option to read- Returns:
- read value or
Optional.empty()
if not found - See Also:
ReadableConfig.get(ConfigOption)
-
toMap
@Internal public Map<String,String> toMap()
Description copied from interface:ReadableConfig
Converts the configuration items into a map of string key-value pairs.- Specified by:
toMap
in interfaceReadableConfig
- Returns:
- a map containing the configuration properties, where the keys are strings and the values are the corresponding configuration values in string format.
-
toConfiguration
public Configuration toConfiguration()
-
-