afedulov commented on code in PR #656:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/656#discussion_r1304642711
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/SnapshotUtils.java:
##########
@@ -284,20 +307,27 @@ static boolean shouldTriggerCronBasedSnapshot(
return false;
}
} catch (ParseException e) {
- LOG.warn("Invalid cron expression: " + cronExpressionString);
return false;
}
}
private static boolean shouldTriggerIntervalBasedSnapshot(
- SnapshotType snapshotType, Duration interval, Instant lastTrigger)
{
+ SnapshotType snapshotType, String triggerExpression, Instant
lastTrigger) {
+
+ Duration interval;
+ try {
+ interval = ConfigurationUtils.convertValue(triggerExpression,
Duration.class);
+ } catch (IllegalArgumentException exception) {
+ return false;
Review Comment:
Modified.
--
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]