[fs] Relocate commons in S3/GS/Azure fs plugins to fix Spark conflict - #3960
Open
Yohahaha wants to merge 2 commits into
Open
[fs] Relocate commons in S3/GS/Azure fs plugins to fix Spark conflict#3960Yohahaha wants to merge 2 commits into
Yohahaha wants to merge 2 commits into
Conversation
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.
Contributor
Author
|
@luoyuxia @wuchong @fresh-borzoni PTAL! |
fresh-borzoni
left a comment
Member
There was a problem hiding this comment.
@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.
Contributor
Author
nice catch! already fixed |
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.
Summary
org.apache.commonsclasses (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, causingNoSuchMethodError: StringSubstitutor.setEnableUndefinedVariableException(boolean)org.apache.commonstoorg.apache.fluss.shaded.org.apache.commonsin all three plugins, consistent with fluss-fs-oss/cos/obs/hdfsTest Plan
mvn verify -pl fluss-filesystems/fluss-fs-s3passesmvn verify -pl fluss-filesystems/fluss-fs-gspasses (19 tests)mvn test -pl fluss-filesystems/fluss-fs-azurepasses (18 tests)org/apache/commons/**entriesNoSuchMethodError🤖 AI-assisted changes - reviewed by human developer