-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[opt](udf-cache) cache more udf classes #40404
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
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
|
loader = ClassLoader.getSystemClassLoader(); | ||
} else { | ||
public UdfClassCache getClassCache(String className, String jarPath, String signature, long expirationTime, | ||
Type funcRetType, Type... parameterTypes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
run buildall |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
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.
### 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
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 thingsso that the
init()
method will not cost too much time.