[FLINK-XXXXX] Relocate Jackson in filesystem plugin POMs to prevent classpath conflicts#27700
Draft
driessamyn-sparta wants to merge 1 commit intoapache:masterfrom
Draft
[FLINK-XXXXX] Relocate Jackson in filesystem plugin POMs to prevent classpath conflicts#27700driessamyn-sparta wants to merge 1 commit intoapache:masterfrom
driessamyn-sparta wants to merge 1 commit intoapache:masterfrom
Conversation
All Hadoop-based filesystem plugins (s3-hadoop, s3-presto, azure, gs, oss) pull in jackson-databind transitively via AWS SDK or Hadoop, but do not relocate it. If the plugin JAR ends up on the job classpath, its older unshaded Jackson shadows any newer version used by the job causing version incompatibilities. Add a com.fasterxml.jackson relocation to the maven-shade-plugin configuration of each affected module, using a module-specific shaded package (e.g. org.apache.flink.fs.s3hadoop.shaded.jackson), consistent with how flink-shaded-jackson handles the core runtime.
Collaborator
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 is the purpose of the change
This PR relocates Jackson in filesystem plugin shade configurations
All Hadoop-based filesystem plugins (s3-hadoop, s3-presto, azure, gs, oss) pull in jackson-databind 2.17.x transitively via AWS SDK v1 or Hadoop, but do not relocate it. If the plugin JAR ends up on the job classpath, its older unshaded Jackson shadows any newer version used by the job, causing for example:
NoSuchFieldError: CLEAR_CURRENT_TOKEN_ON_CLOSEStreamReadFeature.CLEAR_CURRENT_TOKEN_ON_CLOSEwas added in Jackson 2.18.0, so any job using jackson-dataformat-csv 2.18+ fails at runtime with this error.Brief change log
Added a com.fasterxml.jackson relocation to the maven-shade-plugin configuration of each affected module, using a module-specific shaded package (e.g. org.apache.flink.fs.s3hadoop.shaded.jackson), consistent with how flink-shaded-jackson handles the core runtime.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation