类 JobStatusObserver<R extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?>>
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.observer.JobStatusObserver<R>
-
public abstract class JobStatusObserver<R extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?>> extends java.lang.ObjectAn observer to observe the job status.
-
-
字段概要
字段 修饰符和类型 字段 说明 protected EventRecordereventRecorderstatic java.lang.StringMISSING_SESSION_JOB_ERR
-
构造器概要
构造器 构造器 说明 JobStatusObserver(EventRecorder eventRecorder)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected abstract java.util.Optional<org.apache.flink.runtime.client.JobStatusMessage>filterTargetJob(org.apache.flink.kubernetes.operator.api.status.JobStatus status, java.util.List<org.apache.flink.runtime.client.JobStatusMessage> clusterJobStatuses)Filter the target job status message by the job list from the cluster.booleanobserve(FlinkResourceContext<R> ctx)Observe the status of the flink job.protected voidonNoJobsFound(FlinkResourceContext<R> ctx)Callback when no jobs were found on the cluster.protected abstract voidonTargetJobNotFound(FlinkResourceContext<R> ctx)Callback when no matching target job was found on a cluster where jobs were found.protected abstract voidonTimeout(FlinkResourceContext<R> ctx)Callback when list jobs timeout.
-
-
-
字段详细资料
-
MISSING_SESSION_JOB_ERR
public static final java.lang.String MISSING_SESSION_JOB_ERR
- 另请参阅:
- 常量字段值
-
eventRecorder
protected final EventRecorder eventRecorder
-
-
构造器详细资料
-
JobStatusObserver
public JobStatusObserver(EventRecorder eventRecorder)
-
-
方法详细资料
-
observe
public boolean observe(FlinkResourceContext<R> ctx)
Observe the status of the flink job.- 参数:
ctx- Resource context.- 返回:
- If job found return true, otherwise return false.
-
onTargetJobNotFound
protected abstract void onTargetJobNotFound(FlinkResourceContext<R> ctx)
Callback when no matching target job was found on a cluster where jobs were found.- 参数:
ctx- The Flink resource context.
-
onNoJobsFound
protected void onNoJobsFound(FlinkResourceContext<R> ctx)
Callback when no jobs were found on the cluster.- 参数:
ctx- The Flink resource context.
-
onTimeout
protected abstract void onTimeout(FlinkResourceContext<R> ctx)
Callback when list jobs timeout.- 参数:
ctx- Resource context.
-
filterTargetJob
protected abstract java.util.Optional<org.apache.flink.runtime.client.JobStatusMessage> filterTargetJob(org.apache.flink.kubernetes.operator.api.status.JobStatus status, java.util.List<org.apache.flink.runtime.client.JobStatusMessage> clusterJobStatuses)Filter the target job status message by the job list from the cluster.- 参数:
status- the target job status.clusterJobStatuses- the candidate cluster jobs.- 返回:
- The target job status message. If no matched job found,
Optional.empty()will be returned.
-
-