mxm commented on code in PR #728:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/728#discussion_r1434199585
##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/ScalingExecutor.java:
##########
@@ -264,4 +262,21 @@ private static Map<String, String>
getVertexParallelismOverrides(
});
return overrides;
}
+
+ private boolean blockScalingExecution(
+ Context context,
+ Map<JobVertexID, ScalingSummary> scalingSummaries,
+ Configuration conf,
+ Instant now) {
+ var scaleEnabled = conf.get(SCALING_ENABLED);
+ var isExcluded = CalendarUtils.inExcludedPeriods(conf, now);
+ autoScalerEventHandler.handleScalingEvent(
+ context,
+ scalingSummaries,
+ scaleEnabled,
+ isExcluded,
+ conf.get(SCALING_EVENT_INTERVAL));
+
+ return !scaleEnabled || isExcluded;
Review Comment:
I don't feel strongly about including the cause. We can also just send out
scaling events only for actual scaling operations. What @flashJd did is
actually more in line with the current code which does include meta information
like "scalingEnabled" in the event message. If we decide to skip those, for
consistency, I would also remove the "scalingEnabled" flag and only ever emit
scaling events when scaling is enabled and not blocked.
--
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]