This is an automated email from the ASF dual-hosted git repository.
yuqi4733 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 6d29c37b5e [MINOR] Remove unnecessary dependencies (#8736)
6d29c37b5e is described below
commit 6d29c37b5e773dbba4cc08c6e08a8b95f7f4b5b6
Author: Jerry Shao <[email protected]>
AuthorDate: Mon Oct 13 11:59:32 2025 +0800
[MINOR] Remove unnecessary dependencies (#8736)
### What changes were proposed in this pull request?
This PR removes some unnecessary introduced dependencies and packages to
avoid some potential conflicts.
### Why are the changes needed?
For fileset catalog, we don't have to add the hdfs dependencies to the
runtime, hadoop-client is enough.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Local and IT verification.
---
catalogs/catalog-fileset/build.gradle.kts | 15 ---------------
.../integration/test/HadoopUserAuthenticationIT.java | 4 ++++
catalogs/hadoop-common/build.gradle.kts | 1 -
3 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/catalogs/catalog-fileset/build.gradle.kts
b/catalogs/catalog-fileset/build.gradle.kts
index c3c41ed530..7629a1e002 100644
--- a/catalogs/catalog-fileset/build.gradle.kts
+++ b/catalogs/catalog-fileset/build.gradle.kts
@@ -46,21 +46,6 @@ dependencies {
implementation(libs.commons.io)
implementation(libs.hadoop3.client.api)
implementation(libs.hadoop3.client.runtime)
- implementation(libs.hadoop3.hdfs) {
- exclude("com.sun.jersey")
- exclude("javax.servlet", "servlet-api")
- exclude("com.google.guava", "guava")
- exclude("commons-io", "commons-io")
- exclude("org.eclipse.jetty", "*")
- exclude("io.netty")
- exclude("org.fusesource.leveldbjni")
- // Exclude `protobuf-java` 2.5.0 to avoid conflict with a higher version
of `protobuf-java`
- // in the authorization module. The reason is that the class loader of
`catalog-hadoop` is the
- // parent of the class loader of the authorization module, so the class
loader of `catalog-hadoop`
- // will load the class `protobuf-java` 2.5.0 first, which will cause the
authorization module to
- // fail to load the class `protobuf-java` 3.15.8.
- exclude("com.google.protobuf", "protobuf-java")
- }
implementation(libs.slf4j.api)
implementation(libs.metrics.caffeine)
implementation(libs.metrics.core)
diff --git
a/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java
b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java
index e218561e7c..629c772248 100644
---
a/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java
+++
b/catalogs/catalog-fileset/src/test/java/org/apache/gravitino/catalog/fileset/integration/test/HadoopUserAuthenticationIT.java
@@ -252,6 +252,7 @@ public class HadoopUserAuthenticationIT extends BaseIT {
properties.put(KEY_TAB_URI_KEY, TMP_DIR + HADOOP_CLIENT_KEYTAB);
properties.put(PRINCIPAL_KEY, HADOOP_CLIENT_PRINCIPAL);
properties.put("location", HDFS_URL + "/user/hadoop/");
+ properties.put("gravitino.bypass.dfs.namenode.kerberos.principal.pattern",
"*");
kerberosHiveContainer.executeInContainer("hadoop", "fs", "-mkdir",
"/user/hadoop");
@@ -327,6 +328,7 @@ public class HadoopUserAuthenticationIT extends BaseIT {
properties.put(KEY_TAB_URI_KEY, TMP_DIR + HADOOP_CLIENT_KEYTAB);
properties.put(PRINCIPAL_KEY, HADOOP_CLIENT_PRINCIPAL);
properties.put("location", location);
+ properties.put("gravitino.bypass.dfs.namenode.kerberos.principal.pattern",
"*");
kerberosHiveContainer.executeInContainer(
"hadoop", "fs", "-mkdir", "-p", "/user/hadoop/" + catalogName);
@@ -430,6 +432,7 @@ public class HadoopUserAuthenticationIT extends BaseIT {
properties.put(KEY_TAB_URI_KEY, TMP_DIR + HADOOP_CLIENT_KEYTAB);
properties.put(PRINCIPAL_KEY, HADOOP_CLIENT_PRINCIPAL);
properties.put("location", location);
+ properties.put("gravitino.bypass.dfs.namenode.kerberos.principal.pattern",
"*");
kerberosHiveContainer.executeInContainer(
"hadoop", "fs", "-mkdir", "-p", "/user/hadoop/" + catalogName);
@@ -578,6 +581,7 @@ public class HadoopUserAuthenticationIT extends BaseIT {
properties.put(PRINCIPAL_KEY, HADOOP_CLIENT_PRINCIPAL);
properties.put(AUTH_TYPE_KEY, "kerberos");
properties.put("location", localtion);
+ properties.put("gravitino.bypass.dfs.namenode.kerberos.principal.pattern",
"*");
kerberosHiveContainer.executeInContainer(
"hadoop", "fs", "-mkdir", "-p", "/user/hadoop/" + catalogName);
diff --git a/catalogs/hadoop-common/build.gradle.kts
b/catalogs/hadoop-common/build.gradle.kts
index 09fd9f8017..acdeca33e2 100644
--- a/catalogs/hadoop-common/build.gradle.kts
+++ b/catalogs/hadoop-common/build.gradle.kts
@@ -24,7 +24,6 @@ plugins {
// try to avoid adding extra dependencies because it is used by catalogs and
connectors.
dependencies {
implementation(project(":api"))
- implementation(project(":catalogs:catalog-common"))
implementation(libs.commons.lang3)
implementation(libs.hadoop3.client.api)
implementation(libs.hadoop3.client.runtime)