类 AbstractJobReconciler<CR extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<SPEC,STATUS>,SPEC extends org.apache.flink.kubernetes.operator.api.spec.AbstractFlinkSpec,STATUS extends org.apache.flink.kubernetes.operator.api.status.CommonStatus<SPEC>>
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.reconciler.deployment.AbstractFlinkResourceReconciler<CR,SPEC,STATUS>
-
- org.apache.flink.kubernetes.operator.reconciler.deployment.AbstractJobReconciler<CR,SPEC,STATUS>
-
- 所有已实现的接口:
Reconciler<CR>
public abstract class AbstractJobReconciler<CR extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<SPEC,STATUS>,SPEC extends org.apache.flink.kubernetes.operator.api.spec.AbstractFlinkSpec,STATUS extends org.apache.flink.kubernetes.operator.api.status.CommonStatus<SPEC>> extends AbstractFlinkResourceReconciler<CR,SPEC,STATUS>
Reconciler responsible for handling the job lifecycle according to the desired and current states.
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classAbstractJobReconciler.AvailableUpgradeModeObject to capture available upgrade mode.
-
字段概要
-
从类继承的字段 org.apache.flink.kubernetes.operator.reconciler.deployment.AbstractFlinkResourceReconciler
clock, eventRecorder, kubernetesClient, MSG_ROLLBACK, MSG_SPEC_CHANGED, MSG_SUBMIT, MSG_SUSPENDED, resourceScaler, statusRecorder
-
-
构造器概要
构造器 构造器 说明 AbstractJobReconciler(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient, EventRecorder eventRecorder, StatusRecorder<CR,STATUS> statusRecorder, JobAutoScalerFactory autoscalerFactory)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected abstract voidcancelJob(FlinkResourceContext<CR> ctx, org.apache.flink.kubernetes.operator.api.spec.UpgradeMode upgradeMode)Cancel the job for the given resource using the specified upgrade mode.protected AbstractJobReconciler.AvailableUpgradeModechangeLastStateIfCheckpointTooOld(FlinkResourceContext<CR> ctx, org.apache.flink.configuration.Configuration deployConfig)protected abstract voidcleanupAfterFailedJob(FlinkResourceContext<CR> ctx)Removes a failed job.protected AbstractJobReconciler.AvailableUpgradeModegetAvailableUpgradeMode(FlinkResourceContext<CR> ctx, org.apache.flink.configuration.Configuration deployConfig)booleanreadyToReconcile(FlinkResourceContext<CR> ctx)Check whether the given Flink resource is ready to be reconciled or we are still waiting for any pending operation or condition first.booleanreconcileOtherChanges(FlinkResourceContext<CR> ctx)Reconcile any other changes required for this resource that are specific to the reconciler implementation.protected booleanreconcileSpecChange(FlinkResourceContext<CR> ctx, org.apache.flink.configuration.Configuration deployConfig)Reconcile spec upgrade on the currently deployed/suspended Flink resource and update the status accordingly.protected voidrestoreJob(FlinkResourceContext<CR> ctx, SPEC spec, org.apache.flink.configuration.Configuration deployConfig, boolean requireHaMetadata)protected voidresubmitJob(FlinkResourceContext<CR> ctx, boolean requireHaMetadata)-
从类继承的方法 org.apache.flink.kubernetes.operator.reconciler.deployment.AbstractFlinkResourceReconciler
cleanup, cleanupInternal, deploy, flinkVersionChanged, reconcile, setClock, setOwnerReference, shouldRecoverDeployment
-
-
-
-
构造器详细资料
-
AbstractJobReconciler
public AbstractJobReconciler(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient, EventRecorder eventRecorder, StatusRecorder<CR,STATUS> statusRecorder, JobAutoScalerFactory autoscalerFactory)
-
-
方法详细资料
-
readyToReconcile
public boolean readyToReconcile(FlinkResourceContext<CR> ctx)
从类复制的说明:AbstractFlinkResourceReconcilerCheck whether the given Flink resource is ready to be reconciled or we are still waiting for any pending operation or condition first.- 指定者:
readyToReconcile在类中AbstractFlinkResourceReconciler<CR extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<SPEC,STATUS>,SPEC extends org.apache.flink.kubernetes.operator.api.spec.AbstractFlinkSpec,STATUS extends org.apache.flink.kubernetes.operator.api.status.CommonStatus<SPEC>>- 参数:
ctx- Reconciliation context.- 返回:
- True if the resource is ready to be reconciled.
-
reconcileSpecChange
protected boolean reconcileSpecChange(FlinkResourceContext<CR> ctx, org.apache.flink.configuration.Configuration deployConfig) throws java.lang.Exception
从类复制的说明:AbstractFlinkResourceReconcilerReconcile spec upgrade on the currently deployed/suspended Flink resource and update the status accordingly.- 指定者:
reconcileSpecChange在类中AbstractFlinkResourceReconciler<CR extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<SPEC,STATUS>,SPEC extends org.apache.flink.kubernetes.operator.api.spec.AbstractFlinkSpec,STATUS extends org.apache.flink.kubernetes.operator.api.status.CommonStatus<SPEC>>- 参数:
ctx- Reconciliation context.deployConfig- Deployment configuration.- 返回:
- True if spec change reconciliation was executed
- 抛出:
java.lang.Exception- Error during spec upgrade.
-
getAvailableUpgradeMode
protected AbstractJobReconciler.AvailableUpgradeMode getAvailableUpgradeMode(FlinkResourceContext<CR> ctx, org.apache.flink.configuration.Configuration deployConfig) throws java.lang.Exception
- 抛出:
java.lang.Exception
-
changeLastStateIfCheckpointTooOld
@VisibleForTesting protected AbstractJobReconciler.AvailableUpgradeMode changeLastStateIfCheckpointTooOld(FlinkResourceContext<CR> ctx, org.apache.flink.configuration.Configuration deployConfig) throws java.lang.Exception
- 抛出:
java.lang.Exception
-
restoreJob
protected void restoreJob(FlinkResourceContext<CR> ctx, SPEC spec, org.apache.flink.configuration.Configuration deployConfig, boolean requireHaMetadata) throws java.lang.Exception
- 抛出:
java.lang.Exception
-
reconcileOtherChanges
public boolean reconcileOtherChanges(FlinkResourceContext<CR> ctx) throws java.lang.Exception
从类复制的说明:AbstractFlinkResourceReconcilerReconcile any other changes required for this resource that are specific to the reconciler implementation.- 指定者:
reconcileOtherChanges在类中AbstractFlinkResourceReconciler<CR extends org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<SPEC,STATUS>,SPEC extends org.apache.flink.kubernetes.operator.api.spec.AbstractFlinkSpec,STATUS extends org.apache.flink.kubernetes.operator.api.status.CommonStatus<SPEC>>- 参数:
ctx- Reconciliation context.- 返回:
- True if any further reconciliation action was taken.
- 抛出:
java.lang.Exception- Error during reconciliation.
-
resubmitJob
protected void resubmitJob(FlinkResourceContext<CR> ctx, boolean requireHaMetadata) throws java.lang.Exception
- 抛出:
java.lang.Exception
-
cancelJob
protected abstract void cancelJob(FlinkResourceContext<CR> ctx, org.apache.flink.kubernetes.operator.api.spec.UpgradeMode upgradeMode) throws java.lang.Exception
Cancel the job for the given resource using the specified upgrade mode.- 参数:
ctx- Reconciler context.upgradeMode- Upgrade mode used during cancel.- 抛出:
java.lang.Exception- Error during cancellation.
-
cleanupAfterFailedJob
protected abstract void cleanupAfterFailedJob(FlinkResourceContext<CR> ctx) throws java.lang.Exception
Removes a failed job.- 参数:
ctx- Reconciler context.- 抛出:
java.lang.Exception- Error during cancellation.
-
-