ericxiao251 commented on code in PR #22438:
URL: https://github.com/apache/flink/pull/22438#discussion_r1179231832


##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/DataStreamSink.java:
##########
@@ -180,6 +180,18 @@ public DataStreamSink<T> setParallelism(int parallelism) {
         return this;
     }
 
+    /**
+     * Sets the max parallelism for this sink. The degree must be higher than 
zero and less than the
+     * upper bound.

Review Comment:
   I am calling `Transformation.setMaxParallelism` 
[src](https://github.com/apache/flink/blob/master/flink-core/src/main/java/org/apache/flink/api/dag/Transformation.java#L277-L285)
 which does that validation calls under the hood.
   
   But I can add to the `DataStream.setMaxParallelism` as well to be explicit - 
I noticed that is what `SingleOutputStreamOperator.setMaxParallelism` does, 
[src](https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/SingleOutputStreamOperator.java#L145-L160).



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