Skip to content

[common] Load plugin classes directly from jar without decompression#1996

Merged
JingsongLi merged 2 commits intoapache:masterfrom
tsreaper:directory-class-loader
Sep 15, 2023
Merged

[common] Load plugin classes directly from jar without decompression#1996
JingsongLi merged 2 commits intoapache:masterfrom
tsreaper:directory-class-loader

Conversation

@tsreaper
Copy link
Copy Markdown
Contributor

Purpose

Currently to load classes from plugins, PluginLoader have to decompress a jar file out of Paimon distribution jar and load that jar file. It is hard for a long existing client (for example a SQL gateway service) to clean up these jar files.

This PR fixes the issue by loading plugin classes directly from distribution jar without decompression.

Tests

Existing tests should cover the change.

API and Format

No.

Documentation

No.

@tsreaper tsreaper changed the title Load plugin classes directly from jar without decompression [common] Load plugin classes directly from jar without decompression Sep 13, 2023
@JingsongLi
Copy link
Copy Markdown
Contributor

JingsongLi commented Sep 15, 2023

This solution can not work in JDK 11 and JDK 17.

@tsreaper
Copy link
Copy Markdown
Contributor Author

This solution can not work in JDK 11 and JDK 17.

Changed the solution a bit and now it works on both JDK 11 and 17.

Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@JingsongLi JingsongLi merged commit b3f1031 into apache:master Sep 15, 2023
schnappi17 pushed a commit to schnappi17/flink-table-store that referenced this pull request Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants