AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle URL: https://github.com/apache/flink/pull/11725#discussion_r410310549
########## File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/SinkFunction.java ########## @@ -52,6 +54,20 @@ default void invoke(IN value, Context context) throws Exception { invoke(value); } + /** + * This function is called for every watermark. + * + * <p>You have to override this method when implementing a {@code SinkFunction} to handle watermark. + * This method has to be used together with {@link StreamShuffleSink} + * + * @param watermark The watermark to handle. + * @throws Exception This method may throw exceptions. Throwing an exception will cause the operation + * to fail and may trigger recovery. + */ + default void invoke(Watermark watermark) throws Exception { Review comment: `invoke` is not a very good name as that is only associated with the core functionality of a function. I'd probably name it like `processWatermark`, `setWatermark`, or `onWatermark`. Probably a good idea to get more feedback from some API maintainer. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services