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

    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
    • Constructor Detail

      • AbstractFlinkResourceObserver

        public AbstractFlinkResourceObserver​(EventRecorder eventRecorder)
    • 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<?,​?>>
        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.
        ctx - Resource context
        True if we should observe the resource
      • observeInternal

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

        protected abstract boolean checkIfAlreadyUpgraded​(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.
        ctx - Context for resource.