flink-cdc icon indicating copy to clipboard operation
flink-cdc copied to clipboard

Towards Flink CDC 3.0

Open leonardBang opened this issue 3 years ago • 20 comments

Motivation

Provide a user-friendly, end-to-end streaming ELT framework for Data integration users.

Solution

The design docs by Flink CDC maintainers as following:

Umbrella tasks for each module

[prepare and mis]

  • [x] #2610
  • [x] #2670
  • [x] #2671
  • [x] #2689

[module] flink-cdc-common

  • [x] #2624
  • [x] #2625
  • [x] #2626
  • [x] #2640
  • [x] #2627
  • [x] #2628
  • [x] #2629
  • [x] #2642
  • [x] #2644
  • [x] #2651
  • [x] #2668
  • [x] #2669
  • [x] #2666
  • [x] #2693
  • [x] #2739
  • [x] #2740
  • [x] #2743
  • [x] #2748

[module] flink-cdc-cli

  • [x] #2606
  • [x] #2607

[module] flink-cdc-composer

  • [x] #2608
  • [x] #2616
  • [x] #2617
  • [x] #2618
  • [x] #2619
  • [x] #2620
  • [x] #2609
  • [x] #2769

[module] flink-cdc-runtime

  • [x] #2604
  • [x] #2633
  • [x] #2634
  • [x] #2603
  • [x] #2601
  • [x] #2605
  • [x] #2713
  • [x] #2741
  • [x] #2742
  • [x] #2744

[module] flink-cdc-dist

  • [x] #2621
  • [x] #2622

[module] flink-cdc-connect/flink-cdc-pipeline-connectors

  • [x] #2643
  • [x] #2602
  • [x] #2645
  • [x] #2646
  • [x] #2647
  • Kafka Sink
  • Paimon datalake:(optional in 3.0 @lvyanquan )

[module] Docs for cdc 3.0 pipeline

  • [x] #2652
  • [x] #2653
  • [x] #2654
  • [x] #2655
  • [x] #2827
  • [x] #2840
  • [x] #2788

Shared Utilities

  • [x] #2657

leonardBang avatar Nov 02 '23 02:11 leonardBang

Hi @PatrickRen , I can collaborate with you on the subtasks of flink-cdc-composer.

GOODBOY008 avatar Nov 03 '23 12:11 GOODBOY008

Hi All, Are we planning to bump Debezium as part of this task ?

maver1ck avatar Nov 09 '23 10:11 maver1ck

Hi All, Are we planning to bump Debezium as part of this task ?

Hi, maverck, we don't have a plan to dump debezium version yet, but this should happen soon, currently we‘re busy on the 3.0 version whose position is the end-to-end steaming ELT framework.

leonardBang avatar Nov 09 '23 12:11 leonardBang

Hi @leonardBang, As Debezium 2.x is not fully compatible with 1.9.7 I think upgrade also needs major version bump in this repo. So migration to 3.0 is great opportunity for this to happen.

maver1ck avatar Nov 09 '23 13:11 maver1ck

Hi @leonardBang, As Debezium 2.x is not fully compatible with 1.9.7 I think upgrade also needs major version bump in this repo. So migration to 3.0 is great opportunity for this to happen.

Hey, maver1ck As we plan to keep compatibility between 2.4.2 cdc connector and 3.0 cdc connector, the bump version work will be scheduled later, Bumping DBZ 2.x is a big but should to do work from my side.

leonardBang avatar Nov 13 '23 14:11 leonardBang

Hi @leonardBang Thank you for the answer. I went through documentation and I'm excited. I was waiting years for Flink based Kafka Connect alternative. You may have one of the first users here :)

maver1ck avatar Nov 13 '23 14:11 maver1ck

Close this issue as all subtasks finished, will kickoff 3.1 version soon

leonardBang avatar Dec 13 '23 05:12 leonardBang

sink type mysql error

Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "mysql" in the classpath.

Available factory classes are:

com.ververica.cdc.connectors.mysql.factory.MySqlDataSourceFactory at com.ververica.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:60) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.createDataSink(FlinkPipelineComposer.java:144) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:108) at com.ververica.cdc.cli.CliExecutor.run(CliExecutor.java:65) at com.ververica.cdc.cli.CliFrontend.main(CliFrontend.java:62)

sunyaf avatar Dec 20 '23 12:12 sunyaf

sink mysql demo error : Cannot find factory with identifier "mysql" in the classpath

JiangHT1027 avatar Dec 21 '23 07:12 JiangHT1027

sink type mysql error

Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "mysql" in the classpath.

Available factory classes are:

com.ververica.cdc.connectors.mysql.factory.MySqlDataSourceFactory at com.ververica.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:60) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.createDataSink(FlinkPipelineComposer.java:144) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:108) at com.ververica.cdc.cli.CliExecutor.run(CliExecutor.java:65) at com.ververica.cdc.cli.CliFrontend.main(CliFrontend.java:62)

Have you finished this issue? I encountered this too

KiwiGeorge avatar Mar 20 '24 07:03 KiwiGeorge

sink mysql demo error : Cannot find factory with identifier "mysql" in the classpath

Hi @Jiang-HT @KiwiGeorge We don't support MySQL as data sink now, and current support data sinks are Doris and StarRocks.

lvyanquan avatar Mar 20 '24 07:03 lvyanquan

sink mysql demo error : Cannot find factory with identifier "mysql" in the classpath

Hi @Jiang-HT @KiwiGeorge We don't support MySQL as data sink now, and current support data sinks are Doris and StarRocks.

I see there is source code in the project, so... when will you support mysql as data sink?

KiwiGeorge avatar Mar 26 '24 03:03 KiwiGeorge

Do you support Kafka as a data sink? https://nightlies.apache.org/flink/flink-cdc-docs-master/docs/connectors/kafka/#pipeline-connector-options per this, I see Kafka sink, but I seem to face the error: Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "kafka" in the classpath.

Available factory classes are:

com.ververica.cdc.connectors.mysql.factory.MySqlDataSourceFactory at com.ververica.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:60) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.createDataSink(FlinkPipelineComposer.java:144) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:108) at com.ververica.cdc.cli.CliExecutor.run(CliExecutor.java:65) at com.ververica.cdc.cli.CliFrontend.main(CliFrontend.java:62)

shreelatak avatar May 21 '24 07:05 shreelatak

Hi @shreelatak, Kafka pipeline connector is supported in Flink CDC 3.1. However, it's a breaking update and package names like com.ververica.cdc have been renamed to org.apache.flink.cdc, so it won't work with any previous versions. You may download latest version of Flink CDC here and Kafka connectors here.

yuxiqian avatar May 21 '24 08:05 yuxiqian

Hello @yuxiqian , thank you so much for the revert! Do you know which supporting mysql-cdc connector I can find for Flink CDC version 3.1, and where?

My yaml file has the below contents:

source:
   type: mysql
   name: MySQL Source
   hostname: 127.0.0.1
   port: 3306
   username: ****
   password: ****
   tables: patient.\.*

sink:
  type: kafka
  name: Kafka Sink
  properties.bootstrap.servers: PLAINTEXT://localhost:9092
  topic: quickstart_events
  

pipeline:
  name: MySQL to Kafka Pipeline
  parallelism: 2

With the previous Flink CDC version (3.0.1) and connector [flink-cdc-pipeline-connector-mysql-3.0.0.jar], I encountered no issues. Now since having upgraded the Flink CDC (to 3.1) I am facing :

Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "mysql" in the classpath. Available factory classes are:

at org.apache.flink.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:62) at org.apache.flink.cdc.composer.flink.translator.DataSourceTranslator.translate(DataSourceTranslator.java:47) at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:101) at org.apache.flink.cdc.cli.CliExecutor.run(CliExecutor.java:71) at org.apache.flink.cdc.cli.CliFrontend.main(CliFrontend.java:71)

shreelatak avatar May 21 '24 08:05 shreelatak

Connectors are now released under Group ID org.apache.flink. Here are all available connector jars: https://central.sonatype.com/search?q=g:org.apache.flink%20cdc&smo=true

P.S. It is preferred to share Flink CDC related issues on GitHub Discussions or Flink JIRA Kanban.

yuxiqian avatar May 21 '24 09:05 yuxiqian

Do you support Kafka as a data sink? https://nightlies.apache.org/flink/flink-cdc-docs-master/docs/connectors/kafka/#pipeline-connector-options per this, I see Kafka sink, but I seem to face the error: Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "kafka" in the classpath.

Available factory classes are:

com.ververica.cdc.connectors.mysql.factory.MySqlDataSourceFactory at com.ververica.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:60) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.createDataSink(FlinkPipelineComposer.java:144) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:108) at com.ververica.cdc.cli.CliExecutor.run(CliExecutor.java:65) at com.ververica.cdc.cli.CliFrontend.main(CliFrontend.java:62)

do you has solve this problem? I encountered this too

wangrenjun-vs avatar Jun 02 '24 04:06 wangrenjun-vs

Do you support Kafka as a data sink? https://nightlies.apache.org/flink/flink-cdc-docs-master/docs/connectors/kafka/#pipeline-connector-options per this, I see Kafka sink, but I seem to face the error: Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "kafka" in the classpath. Available factory classes are: com.ververica.cdc.connectors.mysql.factory.MySqlDataSourceFactory at com.ververica.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:60) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.createDataSink(FlinkPipelineComposer.java:144) at com.ververica.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:108) at com.ververica.cdc.cli.CliExecutor.run(CliExecutor.java:65) at com.ververica.cdc.cli.CliFrontend.main(CliFrontend.java:62)

do you has solve this problem? I encountered this too

you need jar: https://repo1.maven.org/maven2/org/apache/flink/flink-cdc-pipeline-connector-kafka/3.1.0/flink-cdc-pipeline-connector-kafka-3.1.0.jar

yuan123h avatar Jun 21 '24 10:06 yuan123h

@lvyanquan I am also getting this error when using mysql as a source.

Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "mysql" in the classpath.

Available factory classes are:


        at org.apache.flink.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:62)
        at org.apache.flink.cdc.composer.flink.translator.DataSourceTranslator.translate(DataSourceTranslator.java:47)
        at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:101)
        at org.apache.flink.cdc.cli.CliExecutor.run(CliExecutor.java:71)
        at org.apache.flink.cdc.cli.CliFrontend.main(CliFrontend.java:71)

I am having a little confusion because I followed this guide exactly - https://nightlies.apache.org/flink/flink-cdc-docs-master/docs/get-started/quickstart/mysql-to-starrocks/

This doc uses flink-1.18 and flick-cdc-3.1.0

@shreelatak Were you able to get the demo to work with flink-cdc-3.1.0?

anand-siva avatar Oct 03 '24 16:10 anand-siva

source: type: mysql hostname: 127.0.0.1 port: 3306 username: de***** password: ****** tables: ECommerceData.ecom_customers # Specify the tables to capture changes from (use .* to capture all)

server-id: 5400-5404

server-time-zone: UTC

sink: type: doris fenodes: 127.0.0.1:29030 username: root
password: ""

pipeline: name: Sync MySQL Database to Doris parallelism: 2

[root@d7a4ade0ac24 flink-cdc-3.3.0]# ./bin/flink-cdc.sh /opt/flink/flink-cdc-3.3.0/bin/mysql-to-doris.yaml Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "doris" in the classpath.

Available factory classes are:

org.apache.flink.cdc.connectors.mysql.factory.MySqlDataSourceFactory at org.apache.flink.cdc.composer.utils.FactoryDiscoveryUtils.getFactoryByIdentifier(FactoryDiscoveryUtils.java:65) at org.apache.flink.cdc.composer.flink.translator.DataSinkTranslator.createDataSink(DataSinkTranslator.java:65) at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.translate(FlinkPipelineComposer.java:132) at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:99) at org.apache.flink.cdc.cli.CliExecutor.run(CliExecutor.java:89) at org.apache.flink.cdc.cli.CliFrontend.main(CliFrontend.java:74)

umerwhu avatar Feb 11 '25 02:02 umerwhu