This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch branch-1.2
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-1.2 by this push:
new 42c8c64a11 [Cherry-pick to branch-1.2] [#10457] improvement: Shrink
the package size of Hive Metastore 2 and 3 catalogs (#10465) (#10544)
42c8c64a11 is described below
commit 42c8c64a11583753fdccc0efc8d95f621db069e1
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Mar 30 15:01:37 2026 +0800
[Cherry-pick to branch-1.2] [#10457] improvement: Shrink the package size
of Hive Metastore 2 and 3 catalogs (#10465) (#10544)
**Cherry-pick Information:**
- Original commit: 74e9881f27e1763d17d5af2b93aff7a1a7f26830
- Target branch: `branch-1.2`
- Status: ✅ Clean cherry-pick (no conflicts)
Co-authored-by: Yuhui <[email protected]>
---
catalogs/hive-metastore-common/build.gradle.kts | 9 ++---
catalogs/hive-metastore2-libs/build.gradle.kts | 51 ++++++++++++++++++++++++-
catalogs/hive-metastore3-libs/build.gradle.kts | 42 +++++++++++++++++++-
3 files changed, 93 insertions(+), 9 deletions(-)
diff --git a/catalogs/hive-metastore-common/build.gradle.kts
b/catalogs/hive-metastore-common/build.gradle.kts
index 70fca295eb..aee7e7b812 100644
--- a/catalogs/hive-metastore-common/build.gradle.kts
+++ b/catalogs/hive-metastore-common/build.gradle.kts
@@ -31,15 +31,13 @@ dependencies {
compileOnly(libs.hive2.metastore)
compileOnly(libs.immutables.value)
compileOnly(libs.lombok)
+ compileOnly(libs.caffeine)
+ compileOnly(libs.guava)
+ compileOnly(libs.slf4j.api)
implementation(project(":catalogs:catalog-common")) {
exclude("*")
}
- implementation(project(":clients:client-java-runtime", configuration =
"shadow"))
-
- implementation(libs.caffeine)
- implementation(libs.guava)
- implementation(libs.slf4j.api)
annotationProcessor(libs.immutables.value)
annotationProcessor(libs.lombok)
@@ -118,6 +116,7 @@ dependencies {
exclude("org.slf4j")
}
testImplementation(libs.htrace.core4)
+ testImplementation(libs.caffeine)
testImplementation(libs.junit.jupiter.api)
testImplementation(libs.mockito.core)
testImplementation(libs.testcontainers)
diff --git a/catalogs/hive-metastore2-libs/build.gradle.kts
b/catalogs/hive-metastore2-libs/build.gradle.kts
index b539a1c45b..3f55832464 100644
--- a/catalogs/hive-metastore2-libs/build.gradle.kts
+++ b/catalogs/hive-metastore2-libs/build.gradle.kts
@@ -25,9 +25,56 @@ plugins {
id("idea")
}
+// Note: exclusion lists here are intentionally kept in sync with
hive-metastore3-libs/build.gradle.kts.
+// Guava and Logback are excluded because they are provided by the Gravitino
runtime classpath.
dependencies {
- implementation(libs.hadoop2.common)
- implementation(libs.hive2.metastore)
+ implementation(libs.hadoop2.common) {
+ exclude(group = "ch.qos.logback")
+ exclude(group = "com.github.spotbugs")
+ exclude(group = "com.google.code.findbugs")
+ exclude(group = "com.google.guava")
+ exclude(group = "log4j")
+ exclude(group = "org.apache.avro")
+ exclude(group = "org.apache.logging.log4j")
+ exclude(group = "org.eclipse.jetty.aggregate", module = "jetty-all")
+ exclude(group = "org.eclipse.jetty.orbit", module = "javax.servlet")
+ exclude(group = "org.slf4j")
+ }
+ implementation(libs.hadoop2.mapreduce.client.core) {
+ exclude(group = "com.github.spotbugs")
+ exclude(group = "com.google.code.findbugs")
+ exclude(group = "com.google.guava")
+ exclude(group = "log4j")
+ exclude(group = "org.apache.avro")
+ exclude(group = "org.apache.logging.log4j")
+ exclude(group = "org.slf4j")
+ }
+ implementation(libs.hive2.metastore) {
+ exclude(group = "ant")
+ exclude(group = "ch.qos.logback")
+ exclude(group = "co.cask.tephra")
+ exclude(group = "com.github.joshelser")
+ exclude(group = "com.github.spotbugs")
+ exclude(group = "com.google.code.findbugs")
+ exclude(group = "com.google.guava")
+ exclude(group = "log4j")
+ exclude(group = "com.tdunning", module = "json")
+ exclude(group = "com.zaxxer", module = "HikariCP")
+ exclude(group = "io.dropwizard.metrics")
+ exclude(group = "javax.transaction", module = "transaction-api")
+ exclude(group = "junit")
+ exclude(group = "org.apache.ant")
+ exclude(group = "org.apache.avro")
+ exclude(group = "org.apache.hadoop", module =
"hadoop-yarn-server-resourcemanager")
+ exclude(group = "org.apache.hbase")
+ exclude(group = "org.apache.logging.log4j")
+ exclude(group = "org.apache.parquet", module = "parquet-hadoop-bundle")
+ exclude(group = "org.datanucleus")
+ exclude(group = "org.eclipse.jetty.aggregate", module = "jetty-all")
+ exclude(group = "org.eclipse.jetty.orbit", module = "javax.servlet")
+ exclude(group = "org.openjdk.jol")
+ exclude(group = "org.slf4j")
+ }
}
tasks {
diff --git a/catalogs/hive-metastore3-libs/build.gradle.kts
b/catalogs/hive-metastore3-libs/build.gradle.kts
index ca0ea1ea24..fa2a1a56a4 100644
--- a/catalogs/hive-metastore3-libs/build.gradle.kts
+++ b/catalogs/hive-metastore3-libs/build.gradle.kts
@@ -25,9 +25,47 @@ plugins {
id("idea")
}
+// Note: exclusion lists here are intentionally kept in sync with
hive-metastore2-libs/build.gradle.kts.
+// Guava and Logback are excluded because they are provided by the Gravitino
runtime classpath.
dependencies {
- implementation(libs.hadoop2.common)
- implementation(libs.hive3.metastore)
+ implementation(libs.hadoop2.common) {
+ exclude(group = "ch.qos.logback")
+ exclude(group = "com.github.spotbugs")
+ exclude(group = "com.google.code.findbugs")
+ exclude(group = "com.google.guava")
+ exclude(group = "log4j")
+ exclude(group = "org.apache.avro")
+ exclude(group = "org.apache.logging.log4j")
+ exclude(group = "org.eclipse.jetty.aggregate", module = "jetty-all")
+ exclude(group = "org.eclipse.jetty.orbit", module = "javax.servlet")
+ exclude(group = "org.slf4j")
+ }
+ implementation(libs.hive3.metastore) {
+ exclude(group = "ant")
+ exclude(group = "ch.qos.logback")
+ exclude(group = "co.cask.tephra")
+ exclude(group = "com.github.joshelser")
+ exclude(group = "com.github.spotbugs")
+ exclude(group = "com.google.code.findbugs")
+ exclude(group = "com.google.guava")
+ exclude(group = "log4j")
+ exclude(group = "com.tdunning", module = "json")
+ exclude(group = "com.zaxxer", module = "HikariCP")
+ exclude(group = "io.dropwizard.metrics")
+ exclude(group = "javax.transaction", module = "transaction-api")
+ exclude(group = "junit")
+ exclude(group = "org.apache.ant")
+ exclude(group = "org.apache.avro")
+ exclude(group = "org.apache.hadoop", module =
"hadoop-yarn-server-resourcemanager")
+ exclude(group = "org.apache.hbase")
+ exclude(group = "org.apache.logging.log4j")
+ exclude(group = "org.apache.parquet", module = "parquet-hadoop-bundle")
+ exclude(group = "org.datanucleus")
+ exclude(group = "org.eclipse.jetty.aggregate", module = "jetty-all")
+ exclude(group = "org.eclipse.jetty.orbit", module = "javax.servlet")
+ exclude(group = "org.openjdk.jol")
+ exclude(group = "org.slf4j")
+ }
}
tasks {