[FLINK-39288][docs] Update DataStream API package guidance for Flink 1.20.x and 2.2.x#4339
[FLINK-39288][docs] Update DataStream API package guidance for Flink 1.20.x and 2.2.x#4339lvyanquan merged 9 commits intoapache:masterfrom
Conversation
…1.20.x and 2.2.x - Update pom.xml example for Flink 1.20.x with CDC version 3.6.0-1.20 - Add new pom.xml example for Flink 2.2.x with CDC version 3.6.0-2.2 - Upgrade Java version from 1.8 to 11 for both examples - Use flink-sql-connector-mysql-cdc instead of flink-connector-mysql-cdc - Add flink-connector-base and log4j-slf4j-impl dependencies - Remove redundant flink-shaded-guava explicit dependency - Sync Chinese documentation with English version Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add missing <scope>provided</scope> for flink-streaming-java, flink-clients, flink-core - Use flink-connector-mysql-cdc to match English version - Translate title to Chinese Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| <include>io.debezium:debezium-connector-mysql</include> | ||
| <include>org.apache.flink:flink-connector-debezium</include> | ||
| <include>org.apache.flink:flink-connector-mysql-cdc</include> | ||
| <include>org.apache.flink:flink-sql-connector-mysql-cdc</include> |
There was a problem hiding this comment.
Why we change here? I think keeping dependencies as less as possible is important for datastream users
There was a problem hiding this comment.
This is because when running jobs on Flink 2.2, we depend on two flink-shaded-guava versions: 31.1-jre-17.0(as we directly import org.apache.flink.shaded.guava31 in the code) and 33.4.0-jre-20.0. When running in an IDE (not submitting a JAR to the cluster), since they share the same groupId and artifactId, only the 33.4.0-jre-20.0 dependency can be provided. Therefore, an uber JAR is needed to provide the other flink-shaded-guava dependency.
This dependency is only required for Flink 2.2. For Flink 1.20 jobs, the dependency configuration remains the same as before.
docs/content/docs/connectors/flink-sources/datastream-api-package-guidance.md
Show resolved
Hide resolved
leonardBang
left a comment
There was a problem hiding this comment.
Thanks @lvyanquan for the contribution, I left some comments
- Add flink-shaded-guava version comments for Flink 1.13-1.18 and 2.2 - Add flink-connector-mysql-cdc and flink-cdc-flink2-compat dependencies for Flink 2.2.x - Add guava31 to guava33 relocation for Flink 2.2.x - Translate title to Chinese Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
docs/content/docs/connectors/flink-sources/datastream-api-package-guidance.md
Outdated
Show resolved
Hide resolved
…ersion" This reverts commit 2c75680.
This reverts commit 3bf2060.
…mments - Add flink-shaded-guava 31.1-jre-17.0 for Flink 1.20.x - Add flink-shaded-guava 33.4.0-jre-20.0 for Flink 2.2.x - Add version reference comments for Flink 1.13-1.18 and 2.2 - Sync Chinese documentation with English version Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
leonardBang
left a comment
There was a problem hiding this comment.
Thanks @lvyanquan for the update, LGTM
What is the purpose of the change
This PR updates the DataStream API package guidance documentation to support Flink 1.20.x and Flink 2.2.x with the latest CDC connector versions.
Brief change log
3.6.0-1.20and Flink1.20.33.6.0-2.2and Flink2.2.0flink-sql-connector-mysql-cdcinstead of deprecatedflink-connector-mysql-cdcflink-connector-baseandlog4j-slf4j-implflink-shaded-guavais no longer needed (included in CDC connector)docs/content.zh/matches English versionNotes
Flink 1.20.x
Flink 1.20 does not depend on the compatibility layer code, so there is no need to introduce additional
flink-compatdependencies.Flink 2.2.x
For Flink 2.2.x, it is recommended to use
flink-sql-connector-mysql-cdcinstead of the deprecatedflink-connector-mysql-cdc. Theflink-sql-connector-mysql-cdcis a shaded jar that includes all necessary dependencies and provides better compatibility.Verifying this change
This change is a documentation update and does not affect any code logic.
Does this pull request potentially affect one of the following parts
publicclasses or interfaces: noDocumentation
🤖 Generated with Claude Code