Skip to content

[fs] Relocate commons in S3/GS/Azure fs plugins to fix Spark conflict - #3960

Open
Yohahaha wants to merge 2 commits into
apache:mainfrom
Yohahaha:fix-s3-deps-conflict-with-spark
Open

[fs] Relocate commons in S3/GS/Azure fs plugins to fix Spark conflict#3960
Yohahaha wants to merge 2 commits into
apache:mainfrom
Yohahaha:fix-s3-deps-conflict-with-spark

Conversation

@Yohahaha

@Yohahaha Yohahaha commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The fluss-fs-s3, fluss-fs-gs and fluss-fs-azure shaded jars bundled unrelocated org.apache.commons classes (e.g. commons-text 1.4 from hadoop-common 3.3.4). When these plugin jars are placed on an engine classpath, the old classes shadow the engine's newer ones, e.g. Spark ships commons-text 1.10.0, causing NoSuchMethodError: StringSubstitutor.setEnableUndefinedVariableException(boolean)
  • Relocate org.apache.commons to org.apache.fluss.shaded.org.apache.commons in all three plugins, consistent with fluss-fs-oss/cos/obs/hdfs

Test Plan

  • mvn verify -pl fluss-filesystems/fluss-fs-s3 passes
  • mvn verify -pl fluss-filesystems/fluss-fs-gs passes (19 tests)
  • mvn test -pl fluss-filesystems/fluss-fs-azure passes (18 tests)
  • Verified shaded jars contain no unrelocated org/apache/commons/** entries
  • Verified locally: Fluss S3 on Spark 3.5 no longer throws the NoSuchMethodError

🤖 AI-assisted changes - reviewed by human developer

The fluss-fs-s3 and fluss-fs-gs shaded jars bundled unrelocated
org.apache.commons classes (e.g. commons-text 1.4 from hadoop-common
3.3.4). When loaded on an engine classpath such as Spark, the old
classes shadow the engine's newer ones (Spark ships commons-text
1.10.0), causing NoSuchMethodError on StringSubstitutor
.setEnableUndefinedVariableException. Relocate org.apache.commons to
org.apache.fluss.shaded.org.apache.commons, consistent with the
fluss-fs-oss/cos/obs/hdfs plugins.
@Yohahaha

Copy link
Copy Markdown
Contributor Author

@luoyuxia @wuchong @fresh-borzoni PTAL!

@fresh-borzoni fresh-borzoni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yohahaha Thank you for the PR, makes sense overall.
Can you check fluss-fs-azure as well?

The fluss-fs-azure shaded jar bundled unrelocated org.apache.commons
classes (e.g. commons-text 1.4 from hadoop-common 3.3.4). When loaded
on an engine classpath such as Spark, the old classes shadow the
engine's newer ones (Spark ships commons-text 1.10.0), causing
NoSuchMethodError on StringSubstitutor
.setEnableUndefinedVariableException. Relocate org.apache.commons to
org.apache.fluss.shaded.org.apache.commons, consistent with the
fluss-fs-s3/gs/oss/cos/obs/hdfs plugins.
@Yohahaha Yohahaha changed the title [fs] Relocate commons deps in S3/GS fs plugins to fix Spark conflict [fs] Relocate commons in S3/GS/Azure fs plugins to fix Spark conflict Aug 13, 2026
@Yohahaha

Copy link
Copy Markdown
Contributor Author

@Yohahaha Thank you for the PR, makes sense overall. Can you check fluss-fs-azure as well?

nice catch! already fixed

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