gyfora commented on code in PR #685:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/685#discussion_r1370421339
##########
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:
makes sense
--
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]