Skip to content

Commit 7e273e6

Browse files
vinishjail97claude
andauthored
[736] Make the bundled xtable-utilities jar runnable again (Hudi 0.x) + CI on branch-0.4 (#841)
* [736] Make the bundled xtable-utilities jar runnable again (Hudi 0.x) Cherry-pick of #840 (4daec27) adapted for the Hudi 0.14 line on main-hudi-0x. The #736 root cause applies here too: the #822 shade allowlist dropped runtime deps from the bundled utilities jar, so java -jar RunSync failed with NoClassDefFoundError. Applicable subset for Hudi 0.x: - jol-core: the parent pins it to test scope, but Hudi's ObjectSizeCalculator loads org.openjdk.jol at runtime; override to runtime and add to the shade allowlist (the actual #736 fix). - slf4j-api: add to the allowlist (org/slf4j/LoggerFactory was missing). Dropped from the original #840 (Hudi 1.x only): hudi-hadoop-common and hudi-io do not exist in Hudi 0.14 (that split is 1.x); hudi-common still provides org.apache.hudi.common.fs.FSUtils. There is also no redundant test-scoped hudi-java-client to remove on this branch. Verified: the 0.x bundled jar now contains org/slf4j/LoggerFactory, org/openjdk/jol/info/GraphLayout, org/apache/hudi/common/fs/FSUtils and org/apache/hudi/client/common/HoodieJavaEngineContext. Cherry picked from commit 4daec27. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: run Maven CI build and license check on main-hudi-0x Add main-hudi-0x to the push and pull_request branch triggers so the existing CI (build + test, license check) runs for the long-lived Hudi 0.x branch and PRs targeting it, matching main. package-deploy (release-triggered) and the site workflows are unchanged. The concurrency guard already treats any ref containing "main" as non-cancelable, so main-hudi-0x is covered without further changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: point branch triggers at branch-0.4 (renamed from main-hudi-0x) The release branch was renamed main-hudi-0x -> branch-0.4 to use a version-keyed name instead of a dependency-keyed one. Update the push / pull_request triggers so Maven CI Build and License Check run on the renamed branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 244003d commit 7e273e6

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/mvn-ci-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ on:
2424
push:
2525
branches:
2626
- "main"
27+
- "branch-0.4"
2728

2829
pull_request:
2930
branches:
3031
- "main"
32+
- "branch-0.4"
3133

3234
jobs:
3335
build:

.github/workflows/mvn-license-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ on:
2424
push:
2525
branches:
2626
- "main"
27+
- "branch-0.4"
2728

2829
pull_request:
2930
branches:
3031
- "main"
32+
- "branch-0.4"
3133

3234
jobs:
3335
build:

xtable-utilities/pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,17 @@
222222
<artifactId>hudi-spark${spark.version.prefix}-bundle_${scala.binary.version}</artifactId>
223223
<scope>test</scope>
224224
</dependency>
225+
<!--
226+
Hudi's ObjectSizeCalculator loads org.openjdk.jol at runtime (not only in tests),
227+
so the bundled utilities jar must ship it. The parent dependencyManagement pins
228+
jol-core to test scope, so override to runtime here and add it to the shaded
229+
artifactSet below. See https://github.com/apache/incubator-xtable/issues/736.
230+
-->
225231
<dependency>
226232
<groupId>org.openjdk.jol</groupId>
227233
<artifactId>jol-core</artifactId>
228-
<scope>test</scope>
234+
<version>${jol.core.version}</version>
235+
<scope>runtime</scope>
229236
</dependency>
230237
</dependencies>
231238

@@ -681,6 +688,7 @@
681688
<include>org.json4s:json4s-scalap_${scala.binary.version}</include>
682689
<include>org.lz4:lz4-java</include>
683690
<include>org.objenesis:objenesis</include>
691+
<include>org.openjdk.jol:jol-core</include>
684692
<include>org.reactivestreams:reactive-streams</include>
685693
<include>org.roaringbitmap:RoaringBitmap</include>
686694
<include>org.roaringbitmap:shims</include>
@@ -692,6 +700,7 @@
692700
<include>org.scala-lang.modules:scala-xml_${scala.binary.version}</include>
693701
<include>org.slf4j:jcl-over-slf4j</include>
694702
<include>org.slf4j:jul-to-slf4j</include>
703+
<include>org.slf4j:slf4j-api</include>
695704
<include>org.slf4j:slf4j-reload4j</include>
696705
<include>org.threeten:threeten-extra</include>
697706
<include>org.threeten:threetenbp</include>

0 commit comments

Comments
 (0)