You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "sunxiaojian (via GitHub)" <gi...@apache.org> on 2025/01/15 17:11:01 UTC
[PR] [#6270] (Improvement) unified cache framework [gravitino]
sunxiaojian opened a new pull request, #6271:
URL: https://github.com/apache/gravitino/pull/6271
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
Unified cache framework
### Why are the changes needed?
Fix: https://github.com/apache/gravitino/issues/6270
### Does this PR introduce _any_ user-facing change?
N/A
### How was this patch tested?
N/A
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "tengqm (via GitHub)" <gi...@apache.org>.
tengqm commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2609356655
No objections from me.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "jerryshao (via GitHub)" <gi...@apache.org>.
jerryshao commented on code in PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#discussion_r1924661864
##########
spark-connector/spark-common/build.gradle.kts:
##########
@@ -171,3 +174,18 @@ configurations {
artifacts {
add("testArtifacts", testJar)
}
+
+tasks.withType<ShadowJar>(ShadowJar::class.java) {
Review Comment:
I would be inclined to use @FANNG1 's way to shade jars in spark-runtime, so we don't have to do the shade in this `common` component, and change all the `implementation` to `shadow`.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "tengqm (via GitHub)" <gi...@apache.org>.
tengqm commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2599414930
From a long term perspective, we are really supposed to be cautious when introducing new dependencies. We may need to revisit our existing ones and see if those are necessary.
Most modern software developed in Java, Python, Go, Rust etc have a messy graph of package dependencies. This is unavoidable, but still something we as a team should watch out.
It is perfectly fine to introduce an external dependency when the benefits we gain from it is justified. But bear in mind, all of them are animals in our zoo, and we are gonna take care of it since the day it is incorporated.
I'm too old-fashioned to appreciate this kind of wide-range dependencies, for fear of maintenance burden, supply chain attacks, upgrade efforts, to name a few.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2597860010
@jerqi I understand that it should be adding a 'spark-common-runtime' module, right?
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "tengqm (via GitHub)" <gi...@apache.org>.
tengqm commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2594198850
lgtm
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2597324122
> > > I am concerned that this will introduce extra dependencies that may conflict with Spark runtime jars. Could you analysis which jars are introduced and could we shade them?
> >
> >
> > @FANNG1 The dependency of caffeine is relatively simple, and there are currently no packages that conflict with Spark. Spark itself does not depend on caffeine, so there should be no need shade them yet
>
> You should shade caffeine Because caffeine may be used by other projects like Iceberg. Caffeine is a common libary.
ok, I got it, have another question, Do all references in Gratino need to be shaded ?
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2594419519
> I am concerned that this will introduce extra dependencies that may conflict with Spark runtime jars. Could you analysis which jars are introduced and could we shade them?
@FANNG1 The dependency of caffeine is relatively simple, and there are currently no packages that conflict with Spark. Spark itself does not depend on caffeine, so there should be no need shade them yet
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2597311276
> > I am concerned that this will introduce extra dependencies that may conflict with Spark runtime jars. Could you analysis which jars are introduced and could we shade them?
>
> @FANNG1 The dependency of caffeine is relatively simple, and there are currently no packages that conflict with Spark. Spark itself does not depend on caffeine, so there should be no need shade them yet
You should shade caffeine Because caffeine may be used by other projects like Iceberg. Caffeine is a common libary.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2601615594
> From a long term perspective, we are really supposed to be cautious when introducing new dependencies. We may need to revisit our existing ones and see if those are necessary. Most modern software developed in Java, Python, Go, Rust etc have a messy graph of package dependencies. This is unavoidable, but still something we as a team should watch out. It is perfectly fine to introduce an external dependency when the benefits we gain from it is justified. But bear in mind, all of them are animals in our zoo, and we are gonna take care of it since the day it is incorporated. I'm too old-fashioned to appreciate this kind of wide-range dependencies, for fear of maintenance burden, supply chain attacks, upgrade efforts, to name a few.
I'm inclined to the point of @tengqm , I doubt whether it's worthwhile to unify the cache framework by introducing another 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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian commented on code in PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#discussion_r1921102776
##########
spark-connector/spark-common/build.gradle.kts:
##########
@@ -171,3 +174,18 @@ configurations {
artifacts {
add("testArtifacts", testJar)
}
+
+tasks.withType<ShadowJar>(ShadowJar::class.java) {
Review Comment:
Do we need to add this to every spark-runtime version package? Should we extract the common packages or handle them directly in the common module? This way, we can avoid redundant processing.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on code in PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#discussion_r1920892553
##########
spark-connector/spark-common/build.gradle.kts:
##########
@@ -171,3 +174,18 @@ configurations {
artifacts {
add("testArtifacts", testJar)
}
+
+tasks.withType<ShadowJar>(ShadowJar::class.java) {
Review Comment:
we could shade the jar in spark-runtime module, like `spark-connector/v3.5/spark-runtime/build.gradle.kts`
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2594295416
I am concerned that this will introduce extra dependencies that may conflict with Spark runtime jars. Could you analysis which jars are introduced and could we shade them?
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2598143345
> @jerqi I understand that it should be adding a 'spark-common-runtime' module, right?
No need. We should include `spark-common` jar in our shade jar.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2597385383
> > > > I am concerned that this will introduce extra dependencies that may conflict with Spark runtime jars. Could you analysis which jars are introduced and could we shade them?
> > >
> > >
> > > @FANNG1 The dependency of caffeine is relatively simple, and there are currently no packages that conflict with Spark. Spark itself does not depend on caffeine, so there should be no need shade them yet
> >
> >
> > You should shade caffeine Because caffeine may be used by other projects like Iceberg. Caffeine is a common libary.
>
> ok, I got it, have another question, Do all references in Gravitino need to be shaded ?
You just need to shade the most common libraries.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2598137825
> @jerqi I understand that it should be adding a 'spark-common-runtime' module, right?
Maybe my words aren't clear. `Common libraries` are used by many projects. I should use popular libraries. It may be more acccurate. It's not related to the common module in our project.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2602320342
@tengqm @FANNG1 Usually, only one caching method is kept in a project, which makes it convenient for us to review or solve only one type of problem when it occurs, including reference issues, vulnerability issues, or other usage issues. Of course, this is not a mandatory option.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 merged PR #6271:
URL: https://github.com/apache/gravitino/pull/6271
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2608768732
LGTM, @tengqm @jerryshao @jerqi any other comments?
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian commented on code in PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#discussion_r1925622485
##########
spark-connector/spark-common/build.gradle.kts:
##########
@@ -171,3 +174,18 @@ configurations {
artifacts {
add("testArtifacts", testJar)
}
+
+tasks.withType<ShadowJar>(ShadowJar::class.java) {
Review Comment:
ok
##########
spark-connector/spark-common/build.gradle.kts:
##########
@@ -171,3 +174,18 @@ configurations {
artifacts {
add("testArtifacts", testJar)
}
+
+tasks.withType<ShadowJar>(ShadowJar::class.java) {
Review Comment:
fixed
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2609680876
merged to main, thanks @sunxiaojian for your contribution, @jerqi @jerryshao @tengqm for your review.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian commented on code in PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#discussion_r1925622485
##########
spark-connector/spark-common/build.gradle.kts:
##########
@@ -171,3 +174,18 @@ configurations {
artifacts {
add("testArtifacts", testJar)
}
+
+tasks.withType<ShadowJar>(ShadowJar::class.java) {
Review Comment:
ok
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "tengqm (via GitHub)" <gi...@apache.org>.
tengqm commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2603362725
> @tengqm @FANNG1 Usually, only one caching method is kept in a project, which makes it convenient for us to review or solve only one type of problem when it occurs, including reference issues, vulnerability issues, or other usage issues. Of course, this is not a mandatory option.
Cool. Then this PR is actually unifying caching to a single package?
A big yes from me then.
--
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] [#6270] (Improvement) unified cache framework [gravitino]
Posted by "FANNG1 (via GitHub)" <gi...@apache.org>.
FANNG1 commented on PR #6271:
URL: https://github.com/apache/gravitino/pull/6271#issuecomment-2597195824
@jerryshao WDYT?
--
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