-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](jdbc catalog) Change BE jdbc Driver loading to Java code #46912
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
47f3f0d to
2feed87
Compare
be/src/vec/exec/vjdbc_connector.cpp
Outdated
| std::string driver_path; | ||
|
|
||
| if (_conn_param.driver_path.find(":/") == std::string::npos) { | ||
| driver_path = "file://" + config::jdbc_drivers_dir + "/" + _conn_param.driver_path; |
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.
Driver path maybe an absolute path like: /mnt/disk1/path/to/1.jar, how to handle it?
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 added a path check on the FE side. The Driver URL is always sent by FE to BE, so BE is only responsible for processing it.
2feed87 to
70a8f5b
Compare
|
run buildall |
|
TeamCity cloud ut coverage result: |
|
TeamCity be ut coverage result: |
morningman
left a comment
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.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
…e#46912) Related PR: apache#45806 Problem Summary: In the previous BE processing of JDBC Driver, the Driver jar will be downloaded to the local cache directory first, and the cached jar package will be provided to the JVM for loading. This will cause two problems 1. The jar package in the cache may fail to load due to duplication 2. Frequent repeated loading of the driver by the JVM will cause Compressed class space OOM In order to fix these two problems, this PR has the following changes 1. Remove the logic of BE downloading the Driver Jar to the local cache directory, and directly hand over the original path to Java's Classloader for processing 2. Treat the jar packages with the same name in the same path as one and cache them in the map to avoid repeated loading and cause Compressed class space OOM
…e#46912) Related PR: apache#45806 Problem Summary: In the previous BE processing of JDBC Driver, the Driver jar will be downloaded to the local cache directory first, and the cached jar package will be provided to the JVM for loading. This will cause two problems 1. The jar package in the cache may fail to load due to duplication 2. Frequent repeated loading of the driver by the JVM will cause Compressed class space OOM In order to fix these two problems, this PR has the following changes 1. Remove the logic of BE downloading the Driver Jar to the local cache directory, and directly hand over the original path to Java's Classloader for processing 2. Treat the jar packages with the same name in the same path as one and cache them in the map to avoid repeated loading and cause Compressed class space OOM
…e#46912) Related PR: apache#45806 Problem Summary: In the previous BE processing of JDBC Driver, the Driver jar will be downloaded to the local cache directory first, and the cached jar package will be provided to the JVM for loading. This will cause two problems 1. The jar package in the cache may fail to load due to duplication 2. Frequent repeated loading of the driver by the JVM will cause Compressed class space OOM In order to fix these two problems, this PR has the following changes 1. Remove the logic of BE downloading the Driver Jar to the local cache directory, and directly hand over the original path to Java's Classloader for processing 2. Treat the jar packages with the same name in the same path as one and cache them in the map to avoid repeated loading and cause Compressed class space OOM
…e#46912) Related PR: apache#45806 Problem Summary: In the previous BE processing of JDBC Driver, the Driver jar will be downloaded to the local cache directory first, and the cached jar package will be provided to the JVM for loading. This will cause two problems 1. The jar package in the cache may fail to load due to duplication 2. Frequent repeated loading of the driver by the JVM will cause Compressed class space OOM In order to fix these two problems, this PR has the following changes 1. Remove the logic of BE downloading the Driver Jar to the local cache directory, and directly hand over the original path to Java's Classloader for processing 2. Treat the jar packages with the same name in the same path as one and cache them in the map to avoid repeated loading and cause Compressed class space OOM
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #45806
Problem Summary:
In the previous BE processing of JDBC Driver, the Driver jar will be downloaded to the local cache directory first, and the cached jar package will be provided to the JVM for loading. This will cause two problems
In order to fix these two problems, this PR has the following changes
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)