1u0 commented on a change in pull request #8742: [FLINK-11879] Add validators
for the uses of InputSelectable, BoundedOneInput and BoundedMultiInput
URL: https://github.com/apache/flink/pull/8742#discussion_r302892263
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
##########
@@ -178,6 +182,36 @@ private JobGraph createJobGraph() {
return jobGraph;
}
+ @SuppressWarnings("deprecation")
+ private void prevalidate() {
+ CheckpointConfig checkpointConfig =
streamGraph.getCheckpointConfig();
+
+ if (checkpointConfig.isCheckpointingEnabled()) {
+ // temporarily forbid checkpointing for iterative jobs
+ if (streamGraph.isIterative() &&
!checkpointConfig.isForceCheckpointing()) {
+ throw new UnsupportedOperationException(
+ "Checkpointing is currently not
supported by default for iterative jobs, as we cannot guarantee exactly once
semantics. "
+ + "State checkpoints happen
normally, but records in-transit during the snapshot will be lost upon failure.
"
+ + "\nThe user can force enable
state checkpoints with the reduced guarantees by calling:
env.enableCheckpointing(interval,true)");
+ }
+
+ for (StreamNode node : streamGraph.getStreamNodes()) {
+ StreamOperatorFactory operatorFactory =
node.getOperatorFactory();
+ if (operatorFactory != null) {
+ Class<?> operatorClass =
operatorFactory.getStreamOperatorClass();
+ if
(InputSelectable.class.isAssignableFrom(operatorClass)
+ ||
BoundedOneInput.class.isAssignableFrom(operatorClass)
+ ||
BoundedMultiInput.class.isAssignableFrom(operatorClass)) {
+
+ throw new
UnsupportedOperationException(
+ "Checkpointing
currently does not supported the operator that implements" +
Review comment:
I suggest to change it to `"Checkpointing is currently not supported for
operators that implement "`.
----------------------------------------------------------------
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