Class FlinkSessionJobObserver
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkSessionJob>
-
- org.apache.flink.kubernetes.operator.observer.sessionjob.FlinkSessionJobObserver
-
- All Implemented Interfaces:
Observer<org.apache.flink.kubernetes.operator.api.FlinkSessionJob>
public class FlinkSessionJobObserver extends AbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkSessionJob>
The observer ofFlinkSessionJob.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver
eventRecorder, logger
-
-
Constructor Summary
Constructors Constructor Description FlinkSessionJobObserver(EventRecorder eventRecorder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckIfAlreadyUpgraded(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkSessionJob> ctx)Checks a resource that is currently in the UPGRADING state whether it was already deployed but we simply miss the status information.protected booleanisResourceReadyToBeObserved(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkSessionJob> ctx)Check whether the resource should be observed.protected voidobserveInternal(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkSessionJob> ctx)Internal observer logic specific to each resource type.-
Methods inherited from class org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver
observe
-
-
-
-
Constructor Detail
-
FlinkSessionJobObserver
public FlinkSessionJobObserver(EventRecorder eventRecorder)
-
-
Method Detail
-
isResourceReadyToBeObserved
protected boolean isResourceReadyToBeObserved(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkSessionJob> ctx)
Description copied from class:AbstractFlinkResourceObserverCheck whether the resource should be observed. In certain states such as suspended applications or in-progress upgrades and rollbacks, observing is not necessary.- Overrides:
isResourceReadyToBeObservedin classAbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkSessionJob>- Parameters:
ctx- Resource context- Returns:
- True if we should observe the resource
-
observeInternal
protected void observeInternal(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkSessionJob> ctx)
Description copied from class:AbstractFlinkResourceObserverInternal observer logic specific to each resource type.- Specified by:
observeInternalin classAbstractFlinkResourceObserver<org.apache.flink.kubernetes.operator.api.FlinkSessionJob>- Parameters:
ctx- Resource context
-
checkIfAlreadyUpgraded
protected boolean checkIfAlreadyUpgraded(FlinkResourceContext<org.apache.flink.kubernetes.operator.api.FlinkSessionJob> 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.FlinkSessionJob>- Parameters:
ctx- Context for resource.
-
-