Class FlinkResourceContext<CR extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?>>
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.controller.FlinkResourceContext<CR>
-
- Direct Known Subclasses:
FlinkDeploymentContext,FlinkSessionJobContext
public abstract class FlinkResourceContext<CR extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?>> extends java.lang.ObjectContext for reconciling a Flink resource.
-
-
Field Summary
Fields Modifier and Type Field Description protected FlinkConfigManagerconfigManager
-
Constructor Summary
Constructors Constructor Description FlinkResourceContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected FlinkServicecreateFlinkService()protected abstract org.apache.flink.configuration.ConfigurationcreateObserveConfig()Generate the config that is currently deployed for the resource spec.abstract org.apache.flink.configuration.ConfigurationgetDeployConfig(org.apache.flink.kubernetes.operator.api.spec.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 org.apache.flink.kubernetes.operator.api.spec.KubernetesDeploymentModegetDeploymentMode()FlinkServicegetFlinkService()Get theFlinkServiceimplementation for the current resource.abstract org.apache.flink.kubernetes.operator.api.spec.FlinkVersiongetFlinkVersion()KubernetesJobAutoScalerContextgetJobAutoScalerContext()io.fabric8.kubernetes.client.KubernetesClientgetKubernetesClient()Get KubernetesClient available from JOSDK Context.org.apache.flink.configuration.ConfigurationgetObserveConfig()Get the config that is currently deployed for the resource spec.FlinkOperatorConfigurationgetOperatorConfig()
-
-
-
Field Detail
-
configManager
protected final FlinkConfigManager configManager
-
-
Method Detail
-
getJobAutoScalerContext
public KubernetesJobAutoScalerContext getJobAutoScalerContext()
-
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(org.apache.flink.kubernetes.operator.api.spec.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 theFlinkServiceimplementation 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 org.apache.flink.kubernetes.operator.api.spec.KubernetesDeploymentMode getDeploymentMode()
- Returns:
- Cluster deployment mode.
-
getFlinkVersion
public abstract org.apache.flink.kubernetes.operator.api.spec.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.
-
-