Class AbstractFlinkResourceObserver<CR extends AbstractFlinkResource<?,​?>>

    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
    • Method Detail

      • observe

        public final void observe​(FlinkResourceContext<CR> ctx)
        Description copied from interface: Observer
        Observe the flinkApp status, It will reflect the changed status on the flinkApp resource.
        Specified by:
        observe in interface Observer<CR extends AbstractFlinkResource<?,​?>>
        Parameters:
        ctx - the context with which the operation is executed
      • isResourceReadyToBeObserved

        protected boolean isResourceReadyToBeObserved​(FlinkResourceContext<CR> ctx)
        Check whether the resource should be observed. In certain states such as suspended applications or in-progress upgrades and rollbacks, observing is not necessary.
        Parameters:
        ctx - Resource context
        Returns:
        True if we should observe the resource
      • observeInternal

        protected abstract void observeInternal​(FlinkResourceContext<CR> ctx)
        Internal observer logic specific to each resource type.
        Parameters:
        ctx - Resource context
      • updateStatusToDeployedIfAlreadyUpgraded

        protected abstract void updateStatusToDeployedIfAlreadyUpgraded​(FlinkResourceContext<CR> ctx)
        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.
        Parameters:
        ctx - Context for resource.