Class FlinkConfigManager
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.config.FlinkConfigManager
-
public class FlinkConfigManager extends java.lang.Object
Configuration manager for the Flink operator.
-
-
Constructor Summary
Constructors Constructor Description FlinkConfigManager(java.util.function.Consumer<java.util.Set<java.lang.String>> namespaceListener, boolean snapshotCrdInstalled)
FlinkConfigManager(org.apache.flink.configuration.Configuration defaultConfig)
FlinkConfigManager(org.apache.flink.configuration.Configuration defaultConfig, java.util.function.Consumer<java.util.Set<java.lang.String>> namespaceListener, boolean snapshotCrdInstalled)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.flink.shaded.guava31.com.google.common.cache.Cache<org.apache.flink.kubernetes.operator.config.FlinkConfigManager.Key,org.apache.flink.configuration.Configuration>
getCache()
org.apache.flink.configuration.Configuration
getDefaultConfig()
org.apache.flink.configuration.Configuration
getDefaultConfig(java.lang.String namespace, FlinkVersion flinkVersion)
Get the base configuration for the given namespace and flink version combination.org.apache.flink.configuration.Configuration
getDeployConfig(io.fabric8.kubernetes.api.model.ObjectMeta objectMeta, FlinkDeploymentSpec spec)
Get deployment configuration that will be passed to the Flink Cluster clients during cluster submission.org.apache.flink.configuration.Configuration
getObserveConfig(FlinkDeployment deployment)
Get the observe configuration that can be used to interact with already submitted clusters through the Flink rest clients.FlinkOperatorConfiguration
getOperatorConfiguration()
FlinkOperatorConfiguration
getOperatorConfiguration(java.lang.String namespace, FlinkVersion flinkVersion)
Get the operator configuration for the given namespace and flink version combination.org.apache.flink.configuration.Configuration
getSessionJobConfig(FlinkDeployment deployment, FlinkSessionJobSpec sessionJobSpec)
Get configuration for interacting with session jobs.protected static org.apache.flink.configuration.Configuration
loadGlobalConfiguration(java.util.Optional<java.lang.String> confOverrideDir)
void
updateDefaultConfig(org.apache.flink.configuration.Configuration newConf)
Update the base configuration for the operator.
-
-
-
Constructor Detail
-
FlinkConfigManager
@VisibleForTesting public FlinkConfigManager(org.apache.flink.configuration.Configuration defaultConfig)
-
FlinkConfigManager
public FlinkConfigManager(java.util.function.Consumer<java.util.Set<java.lang.String>> namespaceListener, boolean snapshotCrdInstalled)
-
FlinkConfigManager
public FlinkConfigManager(org.apache.flink.configuration.Configuration defaultConfig, java.util.function.Consumer<java.util.Set<java.lang.String>> namespaceListener, boolean snapshotCrdInstalled)
-
-
Method Detail
-
updateDefaultConfig
@VisibleForTesting public void updateDefaultConfig(org.apache.flink.configuration.Configuration newConf)
Update the base configuration for the operator. Newly generated configs (observe, deploy, etc.) will use this as the base.- Parameters:
newConf
- New config base.
-
getOperatorConfiguration
public FlinkOperatorConfiguration getOperatorConfiguration()
- Returns:
- The base configuration for Flink Operator. This is not tied to any specific resource and is aimed to be used for platform level settings.
-
getDefaultConfig
public org.apache.flink.configuration.Configuration getDefaultConfig()
- Returns:
- The base configuration for Flink Operator. This is not tied to any specific resource and is aimed to be used for platform level settings.
-
getOperatorConfiguration
public FlinkOperatorConfiguration getOperatorConfiguration(java.lang.String namespace, FlinkVersion flinkVersion)
Get the operator configuration for the given namespace and flink version combination. This is different from the platform level base config as it may contain namespaces or version overrides.- Parameters:
namespace
- Resource namespaceflinkVersion
- Resource Flink version- Returns:
- Base config
-
getDefaultConfig
public org.apache.flink.configuration.Configuration getDefaultConfig(java.lang.String namespace, FlinkVersion flinkVersion)
Get the base configuration for the given namespace and flink version combination. This is different from the platform level base config as it may contain namespaces or version overrides.- Parameters:
namespace
- Resource namespaceflinkVersion
- Resource Flink version- Returns:
- Base config
-
getDeployConfig
public org.apache.flink.configuration.Configuration getDeployConfig(io.fabric8.kubernetes.api.model.ObjectMeta objectMeta, FlinkDeploymentSpec spec)
Get deployment configuration that will be passed to the Flink Cluster clients during cluster submission.- Parameters:
objectMeta
- Resource metaspec
- Resource spec- Returns:
- Deployment config
-
getObserveConfig
public org.apache.flink.configuration.Configuration getObserveConfig(FlinkDeployment deployment)
Get the observe configuration that can be used to interact with already submitted clusters through the Flink rest clients.- Parameters:
deployment
- Deployment resource- Returns:
- Observe config
-
getSessionJobConfig
public org.apache.flink.configuration.Configuration getSessionJobConfig(FlinkDeployment deployment, FlinkSessionJobSpec sessionJobSpec)
Get configuration for interacting with session jobs. Similar to the observe configuration for FlinkDeployments.- Parameters:
deployment
- FlinkDeployment for the session clustersessionJobSpec
- Session job spec- Returns:
- Session job config
-
getCache
@VisibleForTesting protected org.apache.flink.shaded.guava31.com.google.common.cache.Cache<org.apache.flink.kubernetes.operator.config.FlinkConfigManager.Key,org.apache.flink.configuration.Configuration> getCache()
-
loadGlobalConfiguration
@VisibleForTesting protected static org.apache.flink.configuration.Configuration loadGlobalConfiguration(java.util.Optional<java.lang.String> confOverrideDir)
-
-