Class AbstractFlinkDeploymentObserver
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkDeployment>
-
- org.apache.flink.kubernetes.operator.observer.deployment.AbstractFlinkDeploymentObserver
-
- All Implemented Interfaces:
Observer<org.apache.flink.kubernetes.operator.api.FlinkDeployment>
- Direct Known Subclasses:
ApplicationObserver,SessionObserver
public abstract class AbstractFlinkDeploymentObserver extends AbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkDeployment>
Base observer for session and application clusters.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerlogger-
Fields inherited from class org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver
eventRecorder
-
-
Constructor Summary
Constructors Constructor Description AbstractFlinkDeploymentObserver(EventRecorder eventRecorder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancheckIfAlreadyUpgraded(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkDeployment> ctx)Checks a resource that is currently in the UPGRADING state whether it was already deployed but we simply miss the status information.protected voidclearErrorsIfDeploymentIsHealthy(org.apache.flink.kubernetes.operator.api.FlinkDeployment dep)protected booleanisJmDeploymentReady(org.apache.flink.kubernetes.operator.api.FlinkDeployment dep)protected booleanisSuspendedJob(org.apache.flink.kubernetes.operator.api.FlinkDeployment deployment)protected abstract voidobserveFlinkCluster(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkDeployment> ctx)Observe the flinkApp status when the cluster is ready.voidobserveInternal(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkDeployment> ctx)Internal observer logic specific to each resource type.protected voidobserveJmDeployment(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkDeployment> ctx)-
Methods inherited from class org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver
isResourceReadyToBeObserved, observe
-
-
-
-
Constructor Detail
-
AbstractFlinkDeploymentObserver
public AbstractFlinkDeploymentObserver(EventRecorder eventRecorder)
-
-
Method Detail
-
observeInternal
public void observeInternal(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkDeployment> ctx)
Description copied from class:AbstractFlinkResourceObserverInternal observer logic specific to each resource type.- Specified by:
observeInternalin classAbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkDeployment>- Parameters:
ctx- Resource context
-
observeJmDeployment
protected void observeJmDeployment(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkDeployment> ctx)
-
isJmDeploymentReady
protected boolean isJmDeploymentReady(org.apache.flink.kubernetes.operator.api.FlinkDeployment dep)
-
clearErrorsIfDeploymentIsHealthy
protected void clearErrorsIfDeploymentIsHealthy(org.apache.flink.kubernetes.operator.api.FlinkDeployment dep)
-
isSuspendedJob
protected boolean isSuspendedJob(org.apache.flink.kubernetes.operator.api.FlinkDeployment deployment)
-
checkIfAlreadyUpgraded
protected boolean checkIfAlreadyUpgraded(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkDeployment> ctx)
Description copied from class:AbstractFlinkResourceObserverChecks 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:
checkIfAlreadyUpgradedin classAbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkDeployment>- Parameters:
ctx- Context for resource.
-
observeFlinkCluster
protected abstract void observeFlinkCluster(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.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
-
-