[opt](udf-cache) cache more udf classes#40404
Merged
morningman merged 5 commits intoapache:masterfrom Sep 25, 2024
Merged
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 38243 ms |
TPC-DS: Total hot run time: 188394 ms |
ClickBench: Total hot run time: 30.88 s |
zhangstar333
reviewed
Sep 6, 2024
| loader = ClassLoader.getSystemClassLoader(); | ||
| } else { | ||
| public UdfClassCache getClassCache(String className, String jarPath, String signature, long expirationTime, | ||
| Type funcRetType, Type... parameterTypes) |
Contributor
There was a problem hiding this comment.
I check the failed two test case, not give jarPath in create function.
so pass jarPath = null to BE,
and maybe should give the path to custom_lib?
25ffcb5 to
94777ab
Compare
Contributor
Author
|
run buildall |
zhangstar333
approved these changes
Sep 24, 2024
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
wuwenchi
approved these changes
Sep 24, 2024
CalvinKirs
approved these changes
Sep 24, 2024
gavinchou
pushed a commit
that referenced
this pull request
Sep 28, 2024
In this PR #34980, we cache the class load of java udf. But when calling init() method, it is still very time consuming when calling `Class.forName()`. This PR add a new class `UdfClassCache` to cache more things so that the `init()` method will not cost too much time.
Closed
16 tasks
morningman
added a commit
to morningman/doris
that referenced
this pull request
Feb 8, 2025
zhangstar333
added a commit
that referenced
this pull request
Feb 13, 2025
### What problem does this PR solve? Problem Summary: in some user case, - the udf-jars package have some resource file, it's maybe about hundreds MBs, so if every instances load the jar, it's easy to cause the BE JVM OOM. - or in some udf-jars have some init operator cause many times, so wants all instance could only init it's once. follow up #40404 support class cache for java-udaf
morningman
added a commit
that referenced
this pull request
Feb 17, 2025
lzyy2024
pushed a commit
to lzyy2024/doris
that referenced
this pull request
Feb 21, 2025
### What problem does this PR solve? Problem Summary: in some user case, - the udf-jars package have some resource file, it's maybe about hundreds MBs, so if every instances load the jar, it's easy to cause the BE JVM OOM. - or in some udf-jars have some init operator cause many times, so wants all instance could only init it's once. follow up apache#40404 support class cache for java-udaf
koarz
pushed a commit
to koarz/doris
that referenced
this pull request
Jun 4, 2025
### What problem does this PR solve? Problem Summary: in some user case, - the udf-jars package have some resource file, it's maybe about hundreds MBs, so if every instances load the jar, it's easy to cause the BE JVM OOM. - or in some udf-jars have some init operator cause many times, so wants all instance could only init it's once. follow up apache#40404 support class cache for java-udaf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR #34980, we cache the class load of java udf.
But when calling init() method, it is still very time consuming
when calling
Class.forName().This PR add a new class
UdfClassCacheto cache more thingsso that the
init()method will not cost too much time.