From 9e547733a86ce0f22319a2a56865f7187ada1c32 Mon Sep 17 00:00:00 2001 From: Jackeyzhe Date: Wed, 19 Aug 2026 00:09:30 +0800 Subject: [PATCH 1/2] [build] Relocate shaded jackson and other internal deps in fluss-fs-s3 The fluss-fs-s3 uber-jar bundles hadoop-common and aws-java-sdk dependencies without any shade relocations, leaking 1,114 unshaded jackson class files (jackson-databind, jackson-core, jackson-annotations, jackson-dataformat-cbor) at com/fasterxml/* paths. This can shadow downstream applications' jackson-core and cause NoSuchMethodError at runtime. Fix by adding the same relocation pattern used by fluss-fs-hadoop-shaded: - com.fasterxml -> org.apache.fluss.fs.shaded.s3.com.fasterxml - org.codehaus -> org.apache.fluss.fs.shaded.s3.org.codehaus - com.ctc -> org.apache.fluss.fs.shaded.s3.com.ctc - com.google.re2j -> org.apache.fluss.fs.shaded.s3.com.google.re2j - org.apache.htrace -> org.apache.fluss.fs.shaded.s3.org.apache.htrace Also excludes META-INF/versions/**/com/fasterxml/** because the shade plugin relocates base-path classes but not Multi-Release JAR entries (same issue class as #3553). Verified: 0 unshaded com/fasterxml entries (base path and MRJ), 1,093 jackson classes correctly relocated, bytecode references in AWS SDK/Hadoop classes rewritten to the shaded path, intentional jaxb-api MRJ entries preserved. Closes #4072 --- fluss-filesystems/fluss-fs-s3/pom.xml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/fluss-filesystems/fluss-fs-s3/pom.xml b/fluss-filesystems/fluss-fs-s3/pom.xml index c25ddbbd8a4..b94e84f6af3 100644 --- a/fluss-filesystems/fluss-fs-s3/pom.xml +++ b/fluss-filesystems/fluss-fs-s3/pom.xml @@ -344,6 +344,41 @@ *:* + + + + com.google.re2j + + org.apache.fluss.fs.shaded.s3.com.google.re2j + + + + org.apache.htrace + + org.apache.fluss.fs.shaded.s3.org.apache.htrace + + + + com.fasterxml + + org.apache.fluss.fs.shaded.s3.com.fasterxml + + + + org.codehaus + + org.apache.fluss.fs.shaded.s3.org.codehaus + + + + com.ctc + + org.apache.fluss.fs.shaded.s3.com.ctc + + + * @@ -353,6 +388,10 @@ mozilla/** META-INF/maven/** META-INF/LICENSE.txt + + META-INF/versions/**/com/fasterxml/** From a6215ed2a8c37b182cf0e60aa7924a179144797a Mon Sep 17 00:00:00 2001 From: Jackeyzhe Date: Mon, 24 Aug 2026 23:07:19 +0800 Subject: [PATCH 2/2] [build] Relocate the whole com.google namespace in fluss-fs-s3 Per review feedback, widen the com.google.re2j relocation to the full com.google namespace. The jar previously still leaked 1,974 unshaded com.google.common (Guava) entries plus j2objc/thirdparty, which is the same shadowing bug class as the jackson leak in #4072. Verified: 0 unshaded com/google entries (base path and MRJ), all constant-pool references to com.google.* rewritten to the shaded path, hadoop's own org.apache.hadoop.thirdparty.com.google namespace left untouched. --- fluss-filesystems/fluss-fs-s3/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fluss-filesystems/fluss-fs-s3/pom.xml b/fluss-filesystems/fluss-fs-s3/pom.xml index b94e84f6af3..0a956bf833b 100644 --- a/fluss-filesystems/fluss-fs-s3/pom.xml +++ b/fluss-filesystems/fluss-fs-s3/pom.xml @@ -349,9 +349,9 @@ and not used / exposed downstream, mirroring the pattern of fluss-fs-hadoop-shaded --> - com.google.re2j + com.google - org.apache.fluss.fs.shaded.s3.com.google.re2j + org.apache.fluss.fs.shaded.s3.com.google