类 SavepointUtils


  • public class SavepointUtils
    extends java.lang.Object
    Savepoint utilities.
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static java.lang.String createSavepointError​(org.apache.flink.kubernetes.operator.api.status.SavepointInfo savepointInfo, java.lang.Long triggerNonce)  
      static SavepointStatus getLastSavepointStatus​(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,​?> resource)  
      static org.apache.flink.core.execution.SavepointFormatType getSavepointFormatType​(org.apache.flink.configuration.Configuration configuration)  
      static boolean gracePeriodEnded​(org.apache.flink.configuration.Configuration conf, org.apache.flink.kubernetes.operator.api.status.SavepointInfo savepointInfo)  
      static void resetTriggerIfJobNotRunning​(org.apache.flink.kubernetes.operator.api.AbstractFlinkResource<?,​?> resource, EventRecorder eventRecorder)  
      static boolean savepointInProgress​(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 correct SavepointTriggerType.
      static boolean triggerSavepointIfNeeded​(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.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • SavepointUtils

        public SavepointUtils()
    • 方法详细资料

      • 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 - FlinkService used to trigger savepoints
        resource - Resource that should be savepointed
        conf - 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 correct SavepointTriggerType.

        This logic is responsible for both manual and periodic savepoint triggering.

        参数:
        resource - Resource to be savepointed
        conf - 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)