mxm commented on code in PR #677:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/677#discussion_r1352290023
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/reconciler/deployment/AbstractFlinkResourceReconciler.java:
##########
@@ -174,6 +182,32 @@ public void reconcile(FlinkResourceContext<CR> ctx) throws
Exception {
}
}
+ private void scaling(FlinkResourceContext<CR> ctx) throws Exception {
+ KubernetesJobAutoScalerContext autoScalerContext =
ctx.getJobAutoScalerContext();
+
+ if (autoscalerDisabled(ctx)) {
+ autoScalerContext.getConfiguration().set(AUTOSCALER_ENABLED,
false);
+ resourceScaler.scale(autoScalerContext);
+ return;
+ }
+ if (waitingForRunning(ctx.getResource().getStatus())) {
+ LOG.info("Autoscaler is waiting for stable, running state");
+ resourceScaler.cleanup(autoScalerContext.getJobKey());
+ return;
Review Comment:
Preferably, I would like any logic related to applying parallelism inside
the autoscaler implementation. This shouldn't change when the autoscaler is
waiting for the running state. In fact, the job state checks should also be
performed by the autoscaler, not by the reconciler. The current code mixes
control over the parallelism overrides between the reconciler and the
autoscaler.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]