Class JobAutoScalerImpl
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.autoscaler.JobAutoScalerImpl
-
- All Implemented Interfaces:
JobAutoScaler
public class JobAutoScalerImpl extends java.lang.Object implements JobAutoScaler
Application and SessionJob autoscaler.
-
-
Constructor Summary
Constructors Constructor Description JobAutoScalerImpl(ScalingMetricCollector metricsCollector, ScalingMetricEvaluator evaluator, ScalingExecutor scalingExecutor, EventRecorder eventRecorder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyParallelismOverrides(FlinkResourceContext<?> ctx)
If there are any parallelism overrides by theJobAutoScaler
apply them to the spec.void
cleanup(FlinkResourceContext<?> ctx)
Called when the custom resource is deleted.protected java.util.Map<java.lang.String,java.lang.String>
getParallelismOverrides(FlinkResourceContext<?> ctx)
void
scale(FlinkResourceContext<?> ctx)
Called as part of the reconciliation loop.
-
-
-
Constructor Detail
-
JobAutoScalerImpl
public JobAutoScalerImpl(ScalingMetricCollector metricsCollector, ScalingMetricEvaluator evaluator, ScalingExecutor scalingExecutor, EventRecorder eventRecorder)
-
-
Method Detail
-
scale
public void scale(FlinkResourceContext<?> ctx)
Description copied from interface:JobAutoScaler
Called as part of the reconciliation loop. Returns true if this call led to scaling.- Specified by:
scale
in interfaceJobAutoScaler
-
cleanup
public void cleanup(FlinkResourceContext<?> ctx)
Description copied from interface:JobAutoScaler
Called when the custom resource is deleted.- Specified by:
cleanup
in interfaceJobAutoScaler
-
getParallelismOverrides
@VisibleForTesting protected java.util.Map<java.lang.String,java.lang.String> getParallelismOverrides(FlinkResourceContext<?> ctx)
-
applyParallelismOverrides
@VisibleForTesting protected void applyParallelismOverrides(FlinkResourceContext<?> ctx)
If there are any parallelism overrides by theJobAutoScaler
apply them to the spec.- Parameters:
ctx
- Resource context
-
-