Class ScalingHistoryUtils


  • public class ScalingHistoryUtils
    extends java.lang.Object
    The utils for scaling history.
    • Constructor Detail

      • ScalingHistoryUtils

        public ScalingHistoryUtils()
    • Method Detail

      • addToScalingHistoryAndStore

        public static <KEY,​Context extends JobAutoScalerContext<KEY>> void addToScalingHistoryAndStore​(AutoScalerStateStore<KEY,​Context> stateStore,
                                                                                                             Context context,
                                                                                                             java.time.Instant now,
                                                                                                             java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​ScalingSummary> summaries)
                                                                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addToScalingHistoryAndStore

        public static <KEY,​Context extends JobAutoScalerContext<KEY>> void addToScalingHistoryAndStore​(AutoScalerStateStore<KEY,​Context> stateStore,
                                                                                                             Context context,
                                                                                                             java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​java.util.SortedMap<java.time.Instant,​ScalingSummary>> scalingHistory,
                                                                                                             java.time.Instant now,
                                                                                                             java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​ScalingSummary> summaries)
                                                                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateVertexList

        public static <KEY,​Context extends JobAutoScalerContext<KEY>> void updateVertexList​(AutoScalerStateStore<KEY,​Context> stateStore,
                                                                                                  Context ctx,
                                                                                                  java.time.Instant now,
                                                                                                  java.util.Set<org.apache.flink.runtime.jobgraph.JobVertexID> vertexSet)
                                                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTrimmedScalingHistory

        @Nonnull
        public static <KEY,​Context extends JobAutoScalerContext<KEY>> java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​java.util.SortedMap<java.time.Instant,​ScalingSummary>> getTrimmedScalingHistory​(AutoScalerStateStore<KEY,​Context> autoScalerStateStore,
                                                                                                                                                                                                                                    Context context,
                                                                                                                                                                                                                                    java.time.Instant now)
                                                                                                                                                                                                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • trimScalingHistory

        public static java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​java.util.SortedMap<java.time.Instant,​ScalingSummary>> trimScalingHistory​(java.time.Instant now,
                                                                                                                                                                        org.apache.flink.configuration.Configuration conf,
                                                                                                                                                                        java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​java.util.SortedMap<java.time.Instant,​ScalingSummary>> scalingHistory)
      • getTrimmedScalingTracking

        @Nonnull
        public static <KEY,​Context extends JobAutoScalerContext<KEY>> ScalingTracking getTrimmedScalingTracking​(AutoScalerStateStore<KEY,​Context> autoScalerStateStore,
                                                                                                                      Context context,
                                                                                                                      java.time.Instant now)
                                                                                                               throws java.lang.Exception
        Throws:
        java.lang.Exception