yuqi1129 commented on code in PR #10590:
URL: https://github.com/apache/gravitino/pull/10590#discussion_r3022247866


##########
bundles/iceberg-gcp-bundle/build.gradle.kts:
##########
@@ -28,13 +26,20 @@ dependencies {
   implementation(libs.google.auth.credentials)
   implementation(libs.google.auth.http)
   implementation(libs.iceberg.gcp.bundle)
+  implementation(libs.guava)
 }
 
-tasks.withType(ShadowJar::class.java) {
+tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar")
 {
   isZip64 = true
   configurations = listOf(project.configurations.runtimeClasspath.get())
   archiveClassifier.set("")
 
+  // Relocate Guava to avoid version conflicts, but exclude already-shaded 
classes from iceberg
+  relocate("com.google.common", 
"org.apache.gravitino.shaded.com.google.common") {
+    // Don't transform iceberg's already-shaded Guava
+    exclude("org.apache.iceberg.gcp.shaded.com.google.common.**")

Review Comment:
   "org.apache.iceberg.gcp.shaded.com.google.common.** does not start with 
"com.google.common", why do we need to exclude it?
   
   Another point, we believe we need to be more cautious about changing this 
file, as the current CI cannot fully cover the change. Have you ever tested the 
bundle jar with Spark or the HDFS command?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to