1u0 commented on a change in pull request #9131: [FLINK-12858][checkpointing]
Stop-with-savepoint, workaround: fail whole job when savepoint is declined by a
task
URL: https://github.com/apache/flink/pull/9131#discussion_r305361660
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointFailureReason.java
##########
@@ -79,4 +79,38 @@
public String message() {
return message;
}
+
+ /**
+ * @return true if this value indicates a failure reason happening
before a checkpoint is passed to a job's tasks.
+ */
+ public boolean isPreFlight() {
Review comment:
Imo, it is the same in regard of being future-proof. Currently I'm checking
at runtime (by a test) that this values are defined for all enum's values.
If someone adds a new enum value, they would need to think and define if
it's `isPreFlight` or not in both approaches.
I personally find the approach with separate method less intrusive and more
friendlier when you need to delete such attribute. It's also more friendlier
(densely located), when you want to see the attribute's values by enum's value.
Please let me know if this is a blocker from your point of view, I'd change
it to constructor/field based approach.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services