Package org.apache.flink.configuration
Class GlobalConfiguration
- java.lang.Object
-
- org.apache.flink.configuration.GlobalConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description static String
FLINK_CONF_FILENAME
static String
HIDDEN_CONTENT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getFlinkConfFilename()
static boolean
isSensitive(String key)
Check whether the key is a hidden key.static Configuration
loadConfiguration()
Loads the global configuration from the environment.static Configuration
loadConfiguration(String configDir)
Loads the configuration files from the specified directory.static Configuration
loadConfiguration(String configDir, Configuration dynamicProperties)
Loads the configuration files from the specified directory.static Configuration
loadConfiguration(Configuration dynamicProperties)
Loads the global configuration and adds the given dynamic properties configuration.
-
-
-
Field Detail
-
FLINK_CONF_FILENAME
public static final String FLINK_CONF_FILENAME
- See Also:
- Constant Field Values
-
HIDDEN_CONTENT
public static final String HIDDEN_CONTENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
loadConfiguration
public static Configuration loadConfiguration()
Loads the global configuration from the environment. Fails if an error occurs during loading. Returns an empty configuration object if the environment variable is not set. In production this variable is set but tests and local execution/debugging don't have this environment variable set. That's why we should fail if it is not set.- Returns:
- Returns the Configuration
-
loadConfiguration
public static Configuration loadConfiguration(Configuration dynamicProperties)
Loads the global configuration and adds the given dynamic properties configuration.- Parameters:
dynamicProperties
- The given dynamic properties- Returns:
- Returns the loaded global configuration with dynamic properties
-
loadConfiguration
public static Configuration loadConfiguration(String configDir)
Loads the configuration files from the specified directory.YAML files are supported as configuration files.
- Parameters:
configDir
- the directory which contains the configuration files
-
loadConfiguration
public static Configuration loadConfiguration(String configDir, @Nullable Configuration dynamicProperties)
Loads the configuration files from the specified directory. If the dynamic properties configuration is not null, then it is added to the loaded configuration.- Parameters:
configDir
- directory to load the configuration fromdynamicProperties
- configuration file containing the dynamic properties. Null if none.- Returns:
- The configuration loaded from the given configuration directory
-
isSensitive
public static boolean isSensitive(String key)
Check whether the key is a hidden key.- Parameters:
key
- the config key
-
getFlinkConfFilename
public static String getFlinkConfFilename()
-
-