Skip to content

[FLINK-XXXXX] Relocate Jackson in filesystem plugin POMs to prevent classpath conflicts#27700

Draft
driessamyn-sparta wants to merge 1 commit intoapache:masterfrom
driessamyn-sparta:relocate-jackson
Draft

[FLINK-XXXXX] Relocate Jackson in filesystem plugin POMs to prevent classpath conflicts#27700
driessamyn-sparta wants to merge 1 commit intoapache:masterfrom
driessamyn-sparta:relocate-jackson

Conversation

@driessamyn-sparta
Copy link

NOTE: PR will be updated once JIRA access approved so I can create a ticket.
Keeping the PR in draft until then.

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_CLOSE

StreamReadFeature.CLEAR_CURRENT_TOKEN_ON_CLOSE was 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:

  • Dependencies (does it add or upgrade a dependency): yes (no new dependencies, but changes how the are handled)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: don't know

Documentation

  • Does this pull request introduce a new feature? no

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.
@flinkbot
Copy link
Collaborator

flinkbot commented Feb 27, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants