You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "yuqi1129 (via GitHub)" <gi...@apache.org> on 2024/08/14 14:29:25 UTC

[PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size [gravitino]

yuqi1129 opened a new pull request, #4521:
URL: https://github.com/apache/gravitino/pull/4521

   ### What changes were proposed in this pull request?
   
   Remove some unnecessary jar dependencies in the runtime classpath for JDBC catalogs.
   
   ### Why are the changes needed?
   
   Shrink JDBC catalog package.
   
   Fix: #4520 
   
   ### Does this PR introduce _any_ user-facing change?
   
   N/A.
   ### How was this patch tested?
   
   Test locally and CI.
   
   MySQL catalog:
   <img width="1165" alt="image" src="https://github.com/user-attachments/assets/ba430543-6186-4429-9b30-54df7660cce1">
   
   
   PostgreSQL catalog:
   
   <img width="1156" alt="image" src="https://github.com/user-attachments/assets/4e743975-a79d-461b-a4d0-5b22ab8a3303">
   
   
   Doris catalog:
   
   <img width="1297" alt="image" src="https://github.com/user-attachments/assets/75a7ad8d-61aa-41f3-964d-cb490d96c345">
   


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1728862878


##########
catalogs/catalog-jdbc-doris/build.gradle.kts:
##########
@@ -61,7 +65,11 @@ tasks {
   }
   val copyCatalogLibs by registering(Copy::class) {
     dependsOn("jar", "runtimeJars")
-    from("build/libs")
+    from("build/libs") {
+      exclude("guava-*.jar")
+      exclude("log4j-*.jar")
+      exclude("slf4j-*.jar")
+    }

Review Comment:
   Those jars already exist in the server class path, duplicated jars are useless.



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao merged PR #4521:
URL: https://github.com/apache/gravitino/pull/4521


-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1728866167


##########
catalogs/catalog-jdbc-doris/build.gradle.kts:
##########
@@ -61,7 +65,11 @@ tasks {
   }
   val copyCatalogLibs by registering(Copy::class) {
     dependsOn("jar", "runtimeJars")
-    from("build/libs")
+    from("build/libs") {
+      exclude("guava-*.jar")
+      exclude("log4j-*.jar")
+      exclude("slf4j-*.jar")
+    }

Review Comment:
   >  If we're using them only in compile, maybe we can change from "implementation" to "compileOnly"?
   
   Yeah, let me have a try.



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1718030895


##########
catalogs/catalog-jdbc-mysql/build.gradle.kts:
##########
@@ -25,30 +25,36 @@ plugins {
 }
 
 dependencies {
-  implementation(project(":api"))
-  implementation(project(":catalogs:catalog-common"))
-  implementation(project(":catalogs:catalog-jdbc-common"))
-  implementation(project(":common"))
-  implementation(project(":core"))
+  implementation(project(":api")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-jdbc-common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":core")) {
+    exclude(group = "*")
+  }
 
   implementation(libs.bundles.log4j)

Review Comment:
   No, there will be compilation errors if we remove the dependency. 



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1728859688


##########
catalogs/catalog-jdbc-doris/build.gradle.kts:
##########
@@ -61,7 +65,11 @@ tasks {
   }
   val copyCatalogLibs by registering(Copy::class) {
     dependsOn("jar", "runtimeJars")
-    from("build/libs")
+    from("build/libs") {
+      exclude("guava-*.jar")
+      exclude("log4j-*.jar")
+      exclude("slf4j-*.jar")
+    }

Review Comment:
   Why do we need to remove these jars explicitly? If we're using them only in compile, maybe we can change from "implementation" to "compileOnly"?



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1730575483


##########
catalogs/catalog-jdbc-doris/build.gradle.kts:
##########
@@ -61,7 +65,11 @@ tasks {
   }
   val copyCatalogLibs by registering(Copy::class) {
     dependsOn("jar", "runtimeJars")
-    from("build/libs")
+    from("build/libs") {
+      exclude("guava-*.jar")
+      exclude("log4j-*.jar")
+      exclude("slf4j-*.jar")
+    }

Review Comment:
   > > If we're using them only in compile, maybe we can change from "implementation" to "compileOnly"?
   > 
   > Yeah, let me have a try.
   
   It seems that making it `compileOnly` can't pass tests and runs into classes not found problem. 



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1730980572


##########
catalogs/catalog-jdbc-mysql/build.gradle.kts:
##########
@@ -25,30 +25,36 @@ plugins {
 }
 
 dependencies {
-  implementation(project(":api"))
-  implementation(project(":catalogs:catalog-common"))
-  implementation(project(":catalogs:catalog-jdbc-common"))
-  implementation(project(":common"))
-  implementation(project(":core"))
+  implementation(project(":api")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-common")) {
+    exclude(group = "*")
+  }

Review Comment:
   Why only mysql relies on "catalog-common"?



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size [gravitino]

Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1717906265


##########
catalogs/catalog-jdbc-mysql/build.gradle.kts:
##########
@@ -25,30 +25,36 @@ plugins {
 }
 
 dependencies {
-  implementation(project(":api"))
-  implementation(project(":catalogs:catalog-common"))
-  implementation(project(":catalogs:catalog-jdbc-common"))
-  implementation(project(":common"))
-  implementation(project(":core"))
+  implementation(project(":api")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-jdbc-common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":core")) {
+    exclude(group = "*")
+  }
 
   implementation(libs.bundles.log4j)

Review Comment:
   Can remove this and keep `implementation(libs.slf4j.api)` ?



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size [gravitino]

Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1718034949


##########
catalogs/catalog-jdbc-mysql/build.gradle.kts:
##########
@@ -25,30 +25,36 @@ plugins {
 }
 
 dependencies {
-  implementation(project(":api"))
-  implementation(project(":catalogs:catalog-common"))
-  implementation(project(":catalogs:catalog-jdbc-common"))
-  implementation(project(":common"))
-  implementation(project(":core"))
+  implementation(project(":api")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-jdbc-common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":common")) {
+    exclude(group = "*")
+  }
+  implementation(project(":core")) {
+    exclude(group = "*")
+  }
 
   implementation(libs.bundles.log4j)

Review Comment:
   alright



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1731002080


##########
catalogs/catalog-jdbc-mysql/build.gradle.kts:
##########
@@ -25,30 +25,36 @@ plugins {
 }
 
 dependencies {
-  implementation(project(":api"))
-  implementation(project(":catalogs:catalog-common"))
-  implementation(project(":catalogs:catalog-jdbc-common"))
-  implementation(project(":common"))
-  implementation(project(":core"))
+  implementation(project(":api")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-common")) {
+    exclude(group = "*")
+  }

Review Comment:
   Only MySQL use `MysqlConstants.GRAVITINO_AUTO_INCREMENT_OFFSET_KEY` and support the feature `auto_increment` now. 



##########
catalogs/catalog-jdbc-mysql/build.gradle.kts:
##########
@@ -25,30 +25,36 @@ plugins {
 }
 
 dependencies {
-  implementation(project(":api"))
-  implementation(project(":catalogs:catalog-common"))
-  implementation(project(":catalogs:catalog-jdbc-common"))
-  implementation(project(":common"))
-  implementation(project(":core"))
+  implementation(project(":api")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-common")) {
+    exclude(group = "*")
+  }

Review Comment:
   Only MySQL use `MysqlConstants.GRAVITINO_AUTO_INCREMENT_OFFSET_KEY` and supports the feature `auto_increment` now. 



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#4520] Imporvement(jdbc-catalogs): Shrink JDBC catalog binary package size to about 3MB. [gravitino]

Posted by "yuqi1129 (via GitHub)" <gi...@apache.org>.
yuqi1129 commented on code in PR #4521:
URL: https://github.com/apache/gravitino/pull/4521#discussion_r1730997605


##########
catalogs/catalog-jdbc-mysql/build.gradle.kts:
##########
@@ -25,30 +25,36 @@ plugins {
 }
 
 dependencies {
-  implementation(project(":api"))
-  implementation(project(":catalogs:catalog-common"))
-  implementation(project(":catalogs:catalog-jdbc-common"))
-  implementation(project(":common"))
-  implementation(project(":core"))
+  implementation(project(":api")) {
+    exclude(group = "*")
+  }
+  implementation(project(":catalogs:catalog-common")) {
+    exclude(group = "*")
+  }

Review Comment:
   It was added by @FANNG1 , let me check the reason. 



-- 
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: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org