Class JobVertexScaler


  • public class JobVertexScaler
    extends java.lang.Object
    Component responsible for computing vertex parallelism based on the scaling metrics.
    • Field Detail

      • INNEFFECTIVE_MESSAGE_FORMAT

        @VisibleForTesting
        public static final java.lang.String INNEFFECTIVE_MESSAGE_FORMAT
        See Also:
        Constant Field Values
    • Constructor Detail

      • JobVertexScaler

        public JobVertexScaler​(EventRecorder eventRecorder)
    • Method Detail

      • computeScaleTargetParallelism

        public int computeScaleTargetParallelism​(AbstractFlinkResource<?,​?> resource,
                                                 org.apache.flink.configuration.Configuration conf,
                                                 org.apache.flink.runtime.jobgraph.JobVertexID vertex,
                                                 java.util.Map<ScalingMetric,​EvaluatedScalingMetric> evaluatedMetrics,
                                                 java.util.SortedMap<java.time.Instant,​ScalingSummary> history)
      • scale

        @VisibleForTesting
        protected static int scale​(int parallelism,
                                   int numKeyGroups,
                                   double scaleFactor,
                                   int minParallelism,
                                   int maxParallelism)
      • setClock

        @VisibleForTesting
        protected void setClock​(java.time.Clock clock)