Class AbstractFlinkDeploymentObserver
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver<FlinkDeployment>
-
- org.apache.flink.kubernetes.operator.observer.deployment.AbstractFlinkDeploymentObserver
-
- All Implemented Interfaces:
Observer<FlinkDeployment>
- Direct Known Subclasses:
ApplicationObserver
,SessionObserver
public abstract class AbstractFlinkDeploymentObserver extends AbstractFlinkResourceObserver<FlinkDeployment>
Base observer for session and application clusters.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
-
Fields inherited from class org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver
configManager, eventRecorder
-
-
Constructor Summary
Constructors Constructor Description AbstractFlinkDeploymentObserver(FlinkConfigManager configManager, EventRecorder eventRecorder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
clearErrorsIfDeploymentIsHealthy(FlinkDeployment dep)
protected boolean
isJmDeploymentReady(FlinkDeployment dep)
protected boolean
isSuspendedJob(FlinkDeployment deployment)
protected abstract void
observeFlinkCluster(FlinkResourceContext<FlinkDeployment> ctx)
Observe the flinkApp status when the cluster is ready.void
observeInternal(FlinkResourceContext<FlinkDeployment> ctx)
Internal observer logic specific to each resource type.protected void
observeJmDeployment(FlinkResourceContext<FlinkDeployment> ctx)
protected void
updateStatusToDeployedIfAlreadyUpgraded(FlinkResourceContext<FlinkDeployment> ctx)
Checks a resource that is currently in the UPGRADING state whether it was already deployed but we simply miss the status information.-
Methods inherited from class org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver
isResourceReadyToBeObserved, observe
-
-
-
-
Constructor Detail
-
AbstractFlinkDeploymentObserver
public AbstractFlinkDeploymentObserver(FlinkConfigManager configManager, EventRecorder eventRecorder)
-
-
Method Detail
-
observeInternal
public void observeInternal(FlinkResourceContext<FlinkDeployment> ctx)
Description copied from class:AbstractFlinkResourceObserver
Internal observer logic specific to each resource type.- Specified by:
observeInternal
in classAbstractFlinkResourceObserver<FlinkDeployment>
- Parameters:
ctx
- Resource context
-
observeJmDeployment
protected void observeJmDeployment(FlinkResourceContext<FlinkDeployment> ctx)
-
isJmDeploymentReady
protected boolean isJmDeploymentReady(FlinkDeployment dep)
-
clearErrorsIfDeploymentIsHealthy
protected void clearErrorsIfDeploymentIsHealthy(FlinkDeployment dep)
-
isSuspendedJob
protected boolean isSuspendedJob(FlinkDeployment deployment)
-
updateStatusToDeployedIfAlreadyUpgraded
protected void updateStatusToDeployedIfAlreadyUpgraded(FlinkResourceContext<FlinkDeployment> ctx)
Description copied from class:AbstractFlinkResourceObserver
Checks a resource that is currently in the UPGRADING state whether it was already deployed but we simply miss the status information. After comparing the target resource generation with the one from the possible deployment if they match we update the status to the already DEPLOYED state.- Specified by:
updateStatusToDeployedIfAlreadyUpgraded
in classAbstractFlinkResourceObserver<FlinkDeployment>
- Parameters:
ctx
- Context for resource.
-
observeFlinkCluster
protected abstract void observeFlinkCluster(FlinkResourceContext<FlinkDeployment> ctx)
Observe the flinkApp status when the cluster is ready. It will be implemented by child class to reflect the changed status on the flinkApp resource.- Parameters:
ctx
- the context with which the operation is executed
-
-