From 3c96411e21c916f15338f916c43e7a7719ad353a Mon Sep 17 00:00:00 2001 From: Vinish Reddy Date: Tue, 7 Jul 2026 15:57:48 -0700 Subject: [PATCH] [736] Make the bundled xtable-utilities jar runnable again Running the bundled utilities jar the way the docs describe (java -jar xtable-utilities_2.12-*-bundled.jar --datasetConfig config.yaml) failed on a chain of NoClassDefFoundErrors, and syncing *to* Hudi was silently skipped. Two upstream changes caused this: #822 replaced the maven-shade "bundle everything" default with an explicit artifactSet allowlist, and the Hudi 1.x bump split hudi-common into hudi-common + hudi-io + hudi-hadoop-common. Runtime dependencies dropped from the shaded jar: org.slf4j:slf4j-api -> org/slf4j/LoggerFactory org.apache.hudi:hudi-hadoop-common -> org/apache/hudi/hadoop/fs/HadoopFSUtils org.apache.hudi:hudi-io -> (runtime transitive, not allowlisted) org.openjdk.jol:jol-core -> org/openjdk/jol/info/GraphLayout (#736) Fixes: - Add slf4j-api, hudi-io and jol-core to the shade allowlist. - jol-core is pinned to test scope by the parent dependencyManagement, so override it to runtime (Hudi's ObjectSizeCalculator loads it at runtime). - hudi-hadoop-common is only a provided/test transitive, so declare it as a runtime dependency of the standalone bundle and allowlist it. - hudi-java-client was declared twice (compile + a redundant test-scoped copy); Maven's last-declaration-wins downgraded it to test scope, so the shade plugin excluded the Hudi write client (HoodieJavaEngineContext) and RunSync skipped HudiConversionTarget. Remove the redundant test declaration so the compile one takes effect and the write client is bundled. Verified end-to-end via java -jar against real tables: - Hudi (table v9, metadata table enabled) -> Delta + Iceberg: reads the Hudi metadata table (the ObjectSizeCalculator/jol path from this issue) and reports "Sync is successful for the following formats ICEBERG,DELTA". - Iceberg -> Hudi: writes a real Hudi table (.hoodie timeline with a completed replacecommit) and reports "Sync is successful ... HUDI". Closes #736. Co-Authored-By: Claude Opus 4.8 (1M context) --- xtable-utilities/pom.xml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/xtable-utilities/pom.xml b/xtable-utilities/pom.xml index 67142199d..d8832abf5 100644 --- a/xtable-utilities/pom.xml +++ b/xtable-utilities/pom.xml @@ -153,6 +153,20 @@ org.apache.hudi hudi-common + + + org.apache.hudi + hudi-hadoop-common + ${hudi.version} + org.apache.hudi hudi-java-client @@ -232,15 +246,17 @@ hudi-spark${spark.version.prefix}-bundle_${scala.binary.version} test - - org.apache.hudi - hudi-java-client - test - + org.openjdk.jol jol-core - test + ${jol.core.version} + runtime @@ -574,6 +590,8 @@ org.apache.httpcomponents.core5:httpcore5-h2 org.apache.hudi:hudi-client-common org.apache.hudi:hudi-common + org.apache.hudi:hudi-hadoop-common + org.apache.hudi:hudi-io org.apache.hudi:hudi-java-client org.apache.hudi:hudi-timeline-service org.apache.iceberg:iceberg-api @@ -696,6 +714,7 @@ org.json4s:json4s-scalap_${scala.binary.version} org.lz4:lz4-java org.objenesis:objenesis + org.openjdk.jol:jol-core org.reactivestreams:reactive-streams org.roaringbitmap:RoaringBitmap org.roaringbitmap:shims @@ -707,6 +726,7 @@ org.scala-lang.modules:scala-xml_${scala.binary.version} org.slf4j:jcl-over-slf4j org.slf4j:jul-to-slf4j + org.slf4j:slf4j-api org.slf4j:slf4j-reload4j org.threeten:threeten-extra org.threeten:threetenbp