Class FlinkResourceContext<CR extends AbstractFlinkResource<?,?>>
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.controller.FlinkResourceContext<CR>
-
- Direct Known Subclasses:
FlinkDeploymentContext
,FlinkSessionJobContext
public abstract class FlinkResourceContext<CR extends AbstractFlinkResource<?,?>> extends java.lang.Object
Context for reconciling a Flink resource.
-
-
Field Summary
Fields Modifier and Type Field Description protected FlinkConfigManager
configManager
-
Constructor Summary
Constructors Constructor Description FlinkResourceContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected FlinkService
createFlinkService()
protected abstract org.apache.flink.configuration.Configuration
createObserveConfig()
Generate the config that is currently deployed for the resource spec.abstract org.apache.flink.configuration.Configuration
getDeployConfig(AbstractFlinkSpec spec)
Get Flink configuration object for deploying the given spec usingAbstractFlinkResourceReconciler.deploy(org.apache.flink.kubernetes.operator.controller.FlinkResourceContext<CR>, SPEC, org.apache.flink.configuration.Configuration, java.util.Optional<java.lang.String>, boolean)
.abstract KubernetesDeploymentMode
getDeploymentMode()
FlinkService
getFlinkService()
Get theFlinkService
implementation for the current resource.abstract FlinkVersion
getFlinkVersion()
io.fabric8.kubernetes.client.KubernetesClient
getKubernetesClient()
Get KubernetesClient available from JOSDK Context.org.apache.flink.configuration.Configuration
getObserveConfig()
Get the config that is currently deployed for the resource spec.FlinkOperatorConfiguration
getOperatorConfig()
-
-
-
Field Detail
-
configManager
protected final FlinkConfigManager configManager
-
-
Method Detail
-
getObserveConfig
public org.apache.flink.configuration.Configuration getObserveConfig()
Get the config that is currently deployed for the resource spec. The returned config may be null in case the resource is not accessible/ready yet.- Returns:
- Config currently deployed.
-
getDeployConfig
public abstract org.apache.flink.configuration.Configuration getDeployConfig(AbstractFlinkSpec spec)
Get Flink configuration object for deploying the given spec usingAbstractFlinkResourceReconciler.deploy(org.apache.flink.kubernetes.operator.controller.FlinkResourceContext<CR>, SPEC, org.apache.flink.configuration.Configuration, java.util.Optional<java.lang.String>, boolean)
.- Parameters:
spec
- Spec for which the config should be created.- Returns:
- Deployment configuration.
-
getFlinkService
public FlinkService getFlinkService()
Get theFlinkService
implementation for the current resource.- Returns:
- Flink service.
-
createFlinkService
protected FlinkService createFlinkService()
-
createObserveConfig
protected abstract org.apache.flink.configuration.Configuration createObserveConfig()
Generate the config that is currently deployed for the resource spec.- Returns:
- Deployed config.
-
getDeploymentMode
public abstract KubernetesDeploymentMode getDeploymentMode()
- Returns:
- Cluster deployment mode.
-
getFlinkVersion
public abstract FlinkVersion getFlinkVersion()
- Returns:
- Cluster Flink Version.
-
getOperatorConfig
public FlinkOperatorConfiguration getOperatorConfig()
- Returns:
- Operator configuration for this resource.
-
getKubernetesClient
public io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient()
Get KubernetesClient available from JOSDK Context.- Returns:
- KubernetesClient.
-
-