[Feature] Support Apache Flink 2.x (2.0, 2.1, 2.2)#4368
Open
shangeyao wants to merge 5 commits into
Open
Conversation
Member
|
Welcome to contribute to this PR. I'm curious—was this done with agentic coding? Which model did you use? >_< |
f34b01f to
0b1b111
Compare
Closes apache#4367 Add support for Apache Flink 2.x series (2.0, 2.1, 2.2) to StreamPark. Key changes: - Extend FlinkVersion.scala to recognize 2.x versions - Create new shims modules: streampark-flink-shims_flink-2.0/2.1/2.2 - Migrate to Java DataStream API (Scala DataStream API removed in Flink 2.x) - Handle ParameterTool relocation from org.apache.flink.api.java.utils to org.apache.flink.util - Implement Flink 2.1 Model API (createModel, fromCall, etc.) - Implement Flink 2.2 FunctionDescriptor and Materialized Tables APIs - Update console-service EnvInitializer regex to match 2.x shims JARs - Add 2.0/2.1/2.2 shims JAR dependencies to console-service pom.xml All shims modules (1.12-1.20 + 2.0-2.2) compile successfully and tests pass.
0b1b111 to
3a90adc
Compare
- checkVersion: support Flink 2.x (2.0, 2.1, 2.2) versions - version detection: fallback to parsing flink-dist JAR filename when CliFrontend fails (Flink 2.x requires Java 11+, but server may run Java 8) - EnvInitializer: extend shims JAR pattern to match 2.x (2.0-2.2) Fixes: java.lang.UnsupportedClassVersionError when adding Flink 2.2
Flink 2.x dependencies require JDK 11+ to compile. Gate the 2.0/2.1/2.2 shims modules and console packaging behind a JDK 11+ Maven profile so Java 8 CI matrices keep passing. Generated-by: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
Document JDK 11+ requirements for Flink 2.x runtime, shims packaging on JDK 11+ builds, and manual configuration scenarios. Generated-by: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
…ce JDK upgrade Parse Flink version from flink-dist JAR names first and resolve Flink JAVA_HOME from flink-env.sh for CLI fallback and job submission, so Console can stay on JDK 8. Generated-by: Cursor Co-authored-by: Cursor <cursoragent@cursor.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What changes were proposed in this pull request
Issue Number: close #4367
This pull request adds support for Apache Flink 2.x series (2.0, 2.1, 2.2) to StreamPark.
Brief change log
FlinkVersion.scalato recognize Flink 2.x versionsstreampark-flink-shims_flink-2.0,streampark-flink-shims_flink-2.1,streampark-flink-shims_flink-2.2ParameterToolrelocation fromorg.apache.flink.api.java.utilstoorg.apache.flink.utilcreateModel,fromCall, etc.)FunctionDescriptorand Materialized Tables APIsEnvInitializer.javaregex to match 2.x shims JARspom.xmlVerifying this change
This change is already covered by existing tests, such as:
streampark-flink-shims-testpassDoes this pull request potentially affect one of the following parts
FlinkVersion.scalaversion detection logic: yes