yuxiqian commented on code in PR #3348: URL: https://github.com/apache/flink-cdc/pull/3348#discussion_r1611687699
########## flink-cdc-composer/src/main/java/org/apache/flink/cdc/composer/flink/translator/DataSinkTranslator.java: ########## @@ -150,4 +150,37 @@ private String generateSinkName(SinkDef sinkDef) { return sinkDef.getName() .orElse(String.format("Flink CDC Event Sink: %s", sinkDef.getType())); } + + private static <CommT> SimpleVersionedSerializer<CommT> getCommittableSerializer(Object sink) { + // TwoPhaseCommittingSink has been deprecated, and its signature has changed + // during Flink 1.18 to 1.19. Remove this when Flink 1.18 is no longer supported. + try { + return (SimpleVersionedSerializer<CommT>) + sink.getClass().getDeclaredMethod("getCommittableSerializer").invoke(sink); Review Comment: Yeah, but it's definitely not an encouraged way to play with Flink :( Maybe we can decouple Flink base with specific connectors and distribute CDC with various Flink versions independently. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org