gyfora commented on code in PR #685:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/685#discussion_r1369655435


##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/config/AutoScalerOptions.java:
##########
@@ -201,8 +201,8 @@ private static ConfigOptions.OptionBuilder 
autoScalerConfig(String key) {
                     .withDescription(
                             "A (semicolon-separated) list of vertex ids in 
hexstring for which to disable scaling. Caution: For non-sink vertices this 
will still scale their downstream operators until 
https://issues.apache.org/jira/browse/FLINK-31215 is implemented.");
 
-    public static final ConfigOption<Duration> SCALING_REPORT_INTERVAL =
-            autoScalerConfig("scaling.report.interval")
+    public static final ConfigOption<Duration> SCALING_EVENT_INTERVAL =
+            autoScalerConfig("scaling.event.interval")

Review Comment:
   Docs seem to be inconsistent with this and should regenerated after renaming 
to `event.interval`



##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/EventUtils.java:
##########
@@ -197,4 +198,19 @@ private static Event buildEvent(
                 .endMetadata()
                 .build();
     }
+
+    private static boolean intervalCheck(Event existing, @Nullable Duration 
interval) {
+        return interval != null
+                && Instant.now()
+                        .isBefore(
+                                Instant.parse(existing.getLastTimestamp())
+                                        .plusMillis(interval.toMillis()));
+    }
+
+    private static boolean labelCheck(
+            Event existing, Predicate<Map<String, String>> dedupePredicate) {
+        return dedupePredicate == null
+                || (existing.getMetadata() != null
+                        && 
dedupePredicate.test(existing.getMetadata().getLabels()));
+    }

Review Comment:
   I may misunderstand something but seems like labels are basically ignored 
when the `interval == null` . In that case intervalCheck is always false. Is 
this intentional? 



-- 
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]

Reply via email to