Class FlinkSessionJobObserver
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.observer.AbstractFlinkResourceObserver<FlinkSessionJob>
-
- org.apache.flink.kubernetes.operator.observer.sessionjob.FlinkSessionJobObserver
-
- All Implemented Interfaces:
Observer<FlinkSessionJob>
public class FlinkSessionJobObserver extends AbstractFlinkResourceObserver<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 boolean
checkIfAlreadyUpgraded(FlinkResourceContext<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 boolean
isResourceReadyToBeObserved(FlinkResourceContext<FlinkSessionJob> ctx)
Check whether the resource should be observed.protected void
observeInternal(FlinkResourceContext<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<FlinkSessionJob> ctx)
Description copied from class:AbstractFlinkResourceObserver
Check whether the resource should be observed. In certain states such as suspended applications or in-progress upgrades and rollbacks, observing is not necessary.- Overrides:
isResourceReadyToBeObserved
in classAbstractFlinkResourceObserver<FlinkSessionJob>
- Parameters:
ctx
- Resource context- Returns:
- True if we should observe the resource
-
observeInternal
protected void observeInternal(FlinkResourceContext<FlinkSessionJob> ctx)
Description copied from class:AbstractFlinkResourceObserver
Internal observer logic specific to each resource type.- Specified by:
observeInternal
in classAbstractFlinkResourceObserver<FlinkSessionJob>
- Parameters:
ctx
- Resource context
-
checkIfAlreadyUpgraded
protected boolean checkIfAlreadyUpgraded(FlinkResourceContext<FlinkSessionJob> 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 classAbstractFlinkResourceObserver<FlinkSessionJob>
- Parameters:
ctx
- Context for resource.
-
-