geyanggang commented on code in PR #10789:
URL: https://github.com/apache/gravitino/pull/10789#discussion_r3152568324


##########
catalogs/catalog-hive/build.gradle.kts:
##########
@@ -49,12 +49,17 @@ dependencies {
   implementation(libs.commons.io)
   implementation(libs.commons.lang3)
   implementation(libs.guava)
-  implementation(libs.hadoop2.auth) {
+  implementation(libs.hadoop3.auth) {
     exclude("*")
   }
-  implementation(libs.hadoop2.common) {
+  implementation(libs.hadoop3.common) {
     exclude("*")
   }
+  // Hadoop 3.x runtime requirements (stripped by exclude("*") above)
+  implementation(libs.hadoop3.shaded.guava)
+  implementation(libs.hadoop3.shaded.protobuf)
+  implementation(libs.commons.configuration2)
+  implementation(libs.re2j)

Review Comment:
       I analyzed both `hadoop-common:2.10.2` (41 compile deps) and `3.3.6` (44 
compile deps) source pom.xml. Hadoop 3 added 10 new deps and removed 7 old 
ones. Of the 10 new: 4 explicitly added back (`hadoop-shaded-guava`, 
`hadoop-shaded-protobuf`, `commons-configuration2`, `re2j`), 1 auto-resolved 
transitively, 5 safely excluded. The excluded categories are identical to 
Hadoop 2.
       I also tried selective excludes instead of `exclude("*")`, but CVE deps 
(Jersey 1.x, jettison, reload4j, etc.) leak in through deep transitive chains 
(`hadoop-auth` → `zookeeper` → ...) that Gradle's per-dependency exclude can't 
fully block. `exclude("*")` + explicit add-back is the only reliable approach 
for a clean classpath.



-- 
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