类 SavepointUtils
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.utils.SavepointUtils
-
public class SavepointUtils extends java.lang.ObjectSavepoint utilities.
-
-
构造器概要
构造器 构造器 说明 SavepointUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static java.lang.StringcreateSavepointError(org.apache.flink.kubernetes.operator.api.status.SavepointInfo savepointInfo, java.lang.Long triggerNonce)static SavepointStatusgetLastSavepointStatus(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource)static org.apache.flink.core.execution.SavepointFormatTypegetSavepointFormatType(org.apache.flink.configuration.Configuration configuration)static booleangracePeriodEnded(org.apache.flink.configuration.Configuration conf, org.apache.flink.kubernetes.operator.api.status.SavepointInfo savepointInfo)static voidresetTriggerIfJobNotRunning(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource, EventRecorder eventRecorder)static booleansavepointInProgress(org.apache.flink.kubernetes.operator.api.status.JobStatus jobStatus)protected static java.util.Optional<org.apache.flink.kubernetes.operator.api.status.SavepointTriggerType>shouldTriggerSavepoint(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource, org.apache.flink.configuration.Configuration conf)Checks whether savepoint should be triggered based on the current status and spec and if yes, returns the correctSavepointTriggerType.static booleantriggerSavepointIfNeeded(FlinkService flinkService, org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource, org.apache.flink.configuration.Configuration conf)Triggers any pending manual or periodic savepoints and updates the status accordingly.
-
-
-
方法详细资料
-
savepointInProgress
public static boolean savepointInProgress(org.apache.flink.kubernetes.operator.api.status.JobStatus jobStatus)
-
getLastSavepointStatus
public static SavepointStatus getLastSavepointStatus(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource)
-
triggerSavepointIfNeeded
public static boolean triggerSavepointIfNeeded(FlinkService flinkService, org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
Triggers any pending manual or periodic savepoints and updates the status accordingly.- 参数:
flinkService-FlinkServiceused to trigger savepointsresource- Resource that should be savepointedconf- Observe config of the resource- 返回:
- True if a savepoint was triggered
- 抛出:
java.lang.Exception- Error during savepoint triggering.
-
shouldTriggerSavepoint
@VisibleForTesting protected static java.util.Optional<org.apache.flink.kubernetes.operator.api.status.SavepointTriggerType> shouldTriggerSavepoint(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource, org.apache.flink.configuration.Configuration conf)Checks whether savepoint should be triggered based on the current status and spec and if yes, returns the correctSavepointTriggerType.This logic is responsible for both manual and periodic savepoint triggering.
- 参数:
resource- Resource to be savepointedconf- Observe configuration of the resource- 返回:
- Optional @
SavepointTriggerType
-
gracePeriodEnded
public static boolean gracePeriodEnded(org.apache.flink.configuration.Configuration conf, org.apache.flink.kubernetes.operator.api.status.SavepointInfo savepointInfo)
-
resetTriggerIfJobNotRunning
public static void resetTriggerIfJobNotRunning(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,?> resource, EventRecorder eventRecorder)
-
createSavepointError
public static java.lang.String createSavepointError(org.apache.flink.kubernetes.operator.api.status.SavepointInfo savepointInfo, java.lang.Long triggerNonce)
-
getSavepointFormatType
public static org.apache.flink.core.execution.SavepointFormatType getSavepointFormatType(org.apache.flink.configuration.Configuration configuration)
-
-