This is an automated email from the ASF dual-hosted git repository.

jshao 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 4534985262 [#6375] improvment(catalog-hadoop): Remove `protobuf-java` 
to avoid conflict with authorization module (#6376)
4534985262 is described below

commit 45349852629d00eb38eff531af1a0f2bd1dab852
Author: Qi Yu <y...@datastrato.com>
AuthorDate: Thu Feb 6 17:43:08 2025 +0800

    [#6375] improvment(catalog-hadoop): Remove `protobuf-java` to avoid 
conflict with authorization module (#6376)
    
    ### What changes were proposed in this pull request?
    
    Remove jar `protobuf-java.jar` from the distribution package to avoid
    conflicts
    
    ### Why are the changes needed?
    
    To make authorization works for GCS fileset.
    
    Fix: #6375
    
    ### Does this PR introduce _any_ user-facing change?
    
    N/A.
    
    ### How was this patch tested?
    
    N/A
---
 catalogs/catalog-hadoop/build.gradle.kts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/catalogs/catalog-hadoop/build.gradle.kts 
b/catalogs/catalog-hadoop/build.gradle.kts
index 3108d993c1..b8877646f5 100644
--- a/catalogs/catalog-hadoop/build.gradle.kts
+++ b/catalogs/catalog-hadoop/build.gradle.kts
@@ -52,6 +52,12 @@ dependencies {
     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.awaitility)

Reply via email to