You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to achieve MySQL to MySQL synchronization through Flink CDC, but when I look at the official documentation, I find that it only supports MySQL as a source, not as a sink. After various searches, I found: https://github.com/apache/flink-connector-jdbc. But how should I use and configure it? Is flink-connector-jdbc used for Flink CDC?
cdc pipeline config:
source:
type: mysqlname: MySQL Sourcehostname: 172.31.203.9port: 3306username: tjptdevpassword: ""tables: FlinkCdCSource.\.*server-id: 5401-5404scan.startup.mode: initialschema-change.enabled: truesink:
type: jdbcname: MySQL Sinkhostname: 172.31.203.9port: 3306username: tjptdevpassword: ""database: FlinkCdCSinkpipeline:
name: MySQL to MySQL Pipelineparallelism: 4
How to configure sink.type? I configured it as mysql, jdbc, and myql-cdc, and all reported the following errors:
[root@tjptdevinteg flink]# env JAVA_HOME=/data/server/flink/jdk-17.0.15+6 ./flink-cdc-3.4.0/bin/flink-cdc.sh piplelines/mysql2mysql0010.yaml
Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "jdbc" 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:67)
at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.translate(FlinkPipelineComposer.java:142)
at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:100)
at org.apache.flink.cdc.cli.CliExecutor.deployWithComposer(CliExecutor.java:101)
at org.apache.flink.cdc.cli.CliExecutor.run(CliExecutor.java:82)
at org.apache.flink.cdc.cli.CliFrontend.main(CliFrontend.java:81)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I want to achieve MySQL to MySQL synchronization through Flink CDC, but when I look at the official documentation, I find that it only supports MySQL as a source, not as a sink. After various searches, I found: https://github.com/apache/flink-connector-jdbc. But how should I use and configure it? Is flink-connector-jdbc used for Flink CDC?
cdc pipeline config:
How to configure sink.type? I configured it as mysql, jdbc, and myql-cdc, and all reported the following errors:
[root@tjptdevinteg flink]# env JAVA_HOME=/data/server/flink/jdk-17.0.15+6 ./flink-cdc-3.4.0/bin/flink-cdc.sh piplelines/mysql2mysql0010.yaml
Exception in thread "main" java.lang.RuntimeException: Cannot find factory with identifier "jdbc" 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:67)
at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.translate(FlinkPipelineComposer.java:142)
at org.apache.flink.cdc.composer.flink.FlinkPipelineComposer.compose(FlinkPipelineComposer.java:100)
at org.apache.flink.cdc.cli.CliExecutor.deployWithComposer(CliExecutor.java:101)
at org.apache.flink.cdc.cli.CliExecutor.run(CliExecutor.java:82)
at org.apache.flink.cdc.cli.CliFrontend.main(CliFrontend.java:81)
Beta Was this translation helpful? Give feedback.
All reactions