Class 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 Detail

      • logger

        protected final org.slf4j.Logger logger
    • Constructor Detail

      • AbstractFlinkDeploymentObserver

        public AbstractFlinkDeploymentObserver​(EventRecorder eventRecorder)
    • Method Detail

      • 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: 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:
        checkIfAlreadyUpgraded in class AbstractFlinkResourceObserver<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