macdoor commented on PR #4294: URL: https://github.com/apache/flink-cdc/pull/4294#issuecomment-4005281507
Hi @yuxiqian, We've been working on Flink 2.2 compatibility in a fork and have a working implementation following the approach referenced in [fluss#1176](https://github.com/apache/fluss/pull/1176) — i.e., introducing a version-specific compat module with runtime bridges. Our branch: https://github.com/macdoor/flink-cdc/tree/feature/opengauss-flink22-compat Key changes we made to get OpenGauss → Paimon pipelines running on Flink 2.2: flink-cdc-flink-compat module — two sub-modules: flink-cdc-flink-compat-flink1 (Flink 1.x bridge with SinkFunction/SourceFunction) and flink-cdc-flink-compat-flink2 (Flink 2.x stub classes: Sink$InitContext, CatalogFactory, Catalog). DataSinkWriterOperator — reflection-based wrapping of SinkWriterOperator to find compatible constructors; fixed getSubtaskIndexCompat() to use getTaskInfo().getIndexOfThisSubtask() (previously returned hardcoded 0, breaking SchemaCoordinator flush synchronization). DataSinkTranslator — getMethods() (not getDeclaredMethods()) to detect two-phase commit across superclasses; SupportsCommitter adapter proxy (serializable) for sinks that declare createCommitter() without implementing the interface. Serializers — added resolveSchemaCompatibility(TypeSerializerSnapshot<T>) (Flink 2.x new abstract method) to all custom TypeSerializerSnapshot implementations without @Override, so they compile against both 1.x and 2.x. SourceSplitSerializer — reflection-based LogicalTypeParser.parse() to handle the removed single-arg overload. PreCommitOperator / schema operators — replaced getRuntimeContext().getIndexOfThisSubtask() with getRuntimeContext().getTaskInfo().getIndexOfThisSubtask(). The pipeline now runs end-to-end on Flink 2.2.0 with a standalone session cluster (OpenGauss source → Paimon sink, all 4 operator stages visible including Sink Committer). Happy to share details, open a draft PR, or contribute directly to this effort. Let us know what would be most helpful! -- 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]
