Package org.apache.flink.autoscaler
Class ScalingExecutor<KEY,Context extends JobAutoScalerContext<KEY>>
- java.lang.Object
-
- org.apache.flink.autoscaler.ScalingExecutor<KEY,Context>
-
public class ScalingExecutor<KEY,Context extends JobAutoScalerContext<KEY>> extends java.lang.Object
Class responsible for executing scaling decisions.
-
-
Constructor Summary
Constructors Constructor Description ScalingExecutor(AutoScalerEventHandler<KEY,Context> autoScalerEventHandler, AutoScalerStateStore<KEY,Context> autoScalerStateStore)
ScalingExecutor(JobVertexScaler<KEY,Context> jobVertexScaler, AutoScalerEventHandler<KEY,Context> autoScalerEventHandler, AutoScalerStateStore<KEY,Context> autoScalerStateStore)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static boolean
allVerticesWithinUtilizationTarget(java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<ScalingMetric,EvaluatedScalingMetric>> evaluatedMetrics, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> scalingSummaries)
boolean
scaleResource(Context context, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<ScalingMetric,EvaluatedScalingMetric>> evaluatedMetrics)
protected void
setClock(java.time.Clock clock)
-
-
-
Constructor Detail
-
ScalingExecutor
public ScalingExecutor(AutoScalerEventHandler<KEY,Context> autoScalerEventHandler, AutoScalerStateStore<KEY,Context> autoScalerStateStore)
-
ScalingExecutor
public ScalingExecutor(JobVertexScaler<KEY,Context> jobVertexScaler, AutoScalerEventHandler<KEY,Context> autoScalerEventHandler, AutoScalerStateStore<KEY,Context> autoScalerStateStore)
-
-
Method Detail
-
scaleResource
public boolean scaleResource(Context context, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<ScalingMetric,EvaluatedScalingMetric>> evaluatedMetrics) throws java.lang.Exception
- Throws:
java.lang.Exception
-
allVerticesWithinUtilizationTarget
protected static boolean allVerticesWithinUtilizationTarget(java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,java.util.Map<ScalingMetric,EvaluatedScalingMetric>> evaluatedMetrics, java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,ScalingSummary> scalingSummaries)
-
setClock
@VisibleForTesting protected void setClock(java.time.Clock clock)
-
-