fapaul commented on a change in pull request #18476:
URL: https://github.com/apache/flink/pull/18476#discussion_r799477721



##########
File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/connector/sink2/StandardSinkTopologies.java
##########
@@ -34,7 +41,21 @@ private StandardSinkTopologies() {}
      */
     public static <CommT> void addGlobalCommitter(
             DataStream<CommittableMessage<CommT>> committables,
-            SerializableSupplier<Committer<CommT>> globalCommitterFactory) {
-        // TODO: FLINK-25726
+            SerializableSupplier<Committer<CommT>> globalCommitterFactory,
+            SerializableSupplier<SimpleVersionedSerializer<CommT>> 
committableSerializer) {
+        final PhysicalTransformation<Void> transformation =
+                (PhysicalTransformation<Void>)
+                        committables
+                                .global()
+                                .transform(
+                                        GLOBAL_COMMITTER_TRANSFORMATION_NAME,
+                                        Types.VOID,
+                                        new GlobalCommitter<>(
+                                                globalCommitterFactory, 
committableSerializer))
+                                .getTransformation();
+        transformation.setChainingStrategy(ChainingStrategy.ALWAYS);

Review comment:
       Actually, there have been preexisting tests to verify that the chaining 
of the `GlobalCommitter` is `ALWAYS` I did not want to change that behavior. 




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