Class ScalingMetrics
- java.lang.Object
-
- org.apache.flink.autoscaler.metrics.ScalingMetrics
-
public class ScalingMetrics extends java.lang.Object
Utilities for computing scaling metrics based on Flink metrics.
-
-
Constructor Summary
Constructors Constructor Description ScalingMetrics()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
computeDataRateMetrics(org.apache.flink.runtime.jobgraph.JobVertexID jobVertexID, java.util.Map<FlinkMetric,AggregatedMetric> flinkMetrics, java.util.Map<ScalingMetric,java.lang.Double> scalingMetrics, JobTopology topology, org.apache.flink.configuration.Configuration conf, java.util.function.Supplier<java.lang.Double> observedTprAvg)
static java.util.Map<ScalingMetric,java.lang.Double>
computeGlobalMetrics(java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.Metric> collectedJmMetrics, java.util.Map<FlinkMetric,AggregatedMetric> collectedTmMetrics, org.apache.flink.configuration.Configuration conf)
static void
computeLagMetrics(java.util.Map<FlinkMetric,AggregatedMetric> flinkMetrics, java.util.Map<ScalingMetric,java.lang.Double> scalingMetrics)
static void
computeLoadMetrics(org.apache.flink.runtime.jobgraph.JobVertexID jobVertexID, java.util.Map<FlinkMetric,AggregatedMetric> flinkMetrics, java.util.Map<ScalingMetric,java.lang.Double> scalingMetrics, IOMetrics ioMetrics, org.apache.flink.configuration.Configuration conf)
static double
computeObservedTprWithBackpressure(double numRecordsInPerSecond, double backpressureMsPerSeconds)
static double
roundMetric(double value)
-
-
-
Method Detail
-
computeLoadMetrics
public static void computeLoadMetrics(org.apache.flink.runtime.jobgraph.JobVertexID jobVertexID, java.util.Map<FlinkMetric,AggregatedMetric> flinkMetrics, java.util.Map<ScalingMetric,java.lang.Double> scalingMetrics, IOMetrics ioMetrics, org.apache.flink.configuration.Configuration conf)
-
computeDataRateMetrics
public static void computeDataRateMetrics(org.apache.flink.runtime.jobgraph.JobVertexID jobVertexID, java.util.Map<FlinkMetric,AggregatedMetric> flinkMetrics, java.util.Map<ScalingMetric,java.lang.Double> scalingMetrics, JobTopology topology, org.apache.flink.configuration.Configuration conf, java.util.function.Supplier<java.lang.Double> observedTprAvg)
-
computeObservedTprWithBackpressure
public static double computeObservedTprWithBackpressure(double numRecordsInPerSecond, double backpressureMsPerSeconds)
-
computeGlobalMetrics
public static java.util.Map<ScalingMetric,java.lang.Double> computeGlobalMetrics(java.util.Map<FlinkMetric,org.apache.flink.runtime.rest.messages.job.metrics.Metric> collectedJmMetrics, java.util.Map<FlinkMetric,AggregatedMetric> collectedTmMetrics, org.apache.flink.configuration.Configuration conf)
-
computeLagMetrics
public static void computeLagMetrics(java.util.Map<FlinkMetric,AggregatedMetric> flinkMetrics, java.util.Map<ScalingMetric,java.lang.Double> scalingMetrics)
-
roundMetric
public static double roundMetric(double value)
-
-