Skip to content

Exclude unrelocated server-side deps from the shaded jar - #13

Merged
hamidgh09 merged 1 commit into
logicalclocks:branch-480.v1from
gibchikafa:exclude_server_deps
Jul 14, 2026
Merged

hamidgh09 merged 1 commit into
logicalclocks:branch-480.v1from
gibchikafa:exclude_server_deps

Conversation

@gibchikafa

Copy link
Copy Markdown

Switching the wrapper to hive-standalone-metastore-server pulled its server-side runtime dependencies into the shaded jar at their original package names: DataNucleus 6 (~1100 classes, with no javax.jdo API to back them), ZooKeeper (~800 entries incl. its Jetty-based admin server and org.apache.jute), and Curator (~2600 entries). Trino only consumes the wrapper in tests, for serdes, the metastore thrift beans and the Acid/Txn utilities - nothing touches the ObjectStore, ZK-based locking or Curator - so these are pure bloat plus duplicate-class/classpath- pollution risk. Exclude them from the shade artifactSet; the jar shrinks by ~4600 entries and all consumed classes remain present.

Switching the wrapper to hive-standalone-metastore-server pulled its
server-side runtime dependencies into the shaded jar at their original
package names: DataNucleus 6 (~1100 classes, with no javax.jdo API to
back them), ZooKeeper (~800 entries incl. its Jetty-based admin server
and org.apache.jute), and Curator (~2600 entries). Trino only consumes
the wrapper in tests, for serdes, the metastore thrift beans and the
Acid/Txn utilities - nothing touches the ObjectStore, ZK-based locking
or Curator - so these are pure bloat plus duplicate-class/classpath-
pollution risk. Exclude them from the shade artifactSet; the jar
shrinks by ~4600 entries and all consumed classes remain present.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hamidgh09
hamidgh09 merged commit 4745648 into logicalclocks:branch-480.v1 Jul 14, 2026
1 check failed
hamidgh09 pushed a commit that referenced this pull request Sep 1, 2026
* [HWORKS-2879] Bump hive and hopsfs version (#11)

* Bump Hive wrapper to Hive 4.1.0

Update the shaded hive-apache artifact to version 4.1.0 so Trino can consume the upgraded Hops Hive build.

Point dep.hive.version at io.hops.hive 4.1.0 and align the shaded Hadoop dependency with 3.4.3.2-EE-RC0, matching the Spark/Hive/Hudi upgrade stack.

* Require Java 17 for Hive wrapper build

Bump the hive-apache Maven target JDK from 1.8 to 17 because the upgraded Hive stack should not build below Java 17.

Align the GitHub Actions build with the same Java 17 baseline by switching setup-java from JDK 8 to JDK 17.

* Use Hive standalone metastore server artifact

Hive 4.1.0 no longer publishes hive-standalone-metastore as a jar; that module is pom-packaged and only resolves its split child modules.

Depend on hive-standalone-metastore-server instead, which is the actual jar containing the standalone metastore implementation for Hive 4.1.0.

Update the shade filter coordinate to match the Hops Hive artifact so package.jdo and duplicated metastore API classes continue to be excluded from the shaded output.

* Fix Hive 4.1 wrapper build

Remove the local Thrift code generation step from the wrapper build. Hive 4.1 publishes the generated metastore API classes in hive-standalone-metastore-common, which is pulled transitively by hive-standalone-metastore-server, so the wrapper no longer needs to run the old thrift:0.9.3 Docker image.

This avoids the thrift:0.9.3 amd64 container failure on Apple Silicon while still compiling against the generated Hive metastore API classes from the Hive artifacts.

Update the patched JsonSerDe and AvroDeserializer sources for Hive 4.1 API changes: AbstractSerDe.initialize now receives table and partition properties, and StructTypeInfo returns List rather than ArrayList.

Upgrade maven-shade-plugin to 3.6.0 so shading can process Java 22 multi-release classes present in the Hive 4.1 dependency graph.

* Strip shaded Hive signature metadata

Exclude META-INF signature files from the shaded hive-apache jar.

Hive 4.1.0 brings signed dependencies into the wrapper. Once shaded, those copied signatures no longer match the combined jar manifest and downstream javac service loading fails in Trino with: Invalid signature file digest for Manifest main attributes.

Remove *.SF, *.DSA, and *.RSA entries during shading so trino-metastore can compile against io.hops.hive:hive-apache:4.1.0.

* Bump Hive wrapper artifact version

Publish the Hive wrapper as 4.1.0-1 while keeping the underlying Hive dependency at 4.1.0.

This avoids republishing over the upstream-version artifact after the Java 17, Hive 4.1 API, and shaded signature metadata fixes.

* Exclude unrelocated server-side deps from the shaded jar (#13)

Switching the wrapper to hive-standalone-metastore-server pulled its
server-side runtime dependencies into the shaded jar at their original
package names: DataNucleus 6 (~1100 classes, with no javax.jdo API to
back them), ZooKeeper (~800 entries incl. its Jetty-based admin server
and org.apache.jute), and Curator (~2600 entries). Trino only consumes
the wrapper in tests, for serdes, the metastore thrift beans and the
Acid/Txn utilities - nothing touches the ObjectStore, ZK-based locking
or Curator - so these are pure bloat plus duplicate-class/classpath-
pollution risk. Exclude them from the shade artifactSet; the jar
shrinks by ~4600 entries and all consumed classes remain present.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

* Change version to 4.1.0.1

* Bump hopsfs version to 3.4.3.1-EE-RC5

* Align version with hive version

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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