-
Notifications
You must be signed in to change notification settings - Fork 642
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
[ISSUE #367] Optimize plugin load #519
Conversation
ruanwenjun
commented
Sep 10, 2021
•
edited
Loading
edited
- Optimize plugin load, support load plugin by plugin instance name, these means we needn't load all plugin
- Optimize install plugin, suppory install plugin by ./gradlew jar dist
- Make UrlClassLoader siglenton
0a35c2c
to
b3ecf54
Compare
Codecov Report
@@ Coverage Diff @@
## develop #519 +/- ##
=============================================
+ Coverage 10.94% 11.01% +0.06%
- Complexity 376 378 +2
=============================================
Files 258 260 +2
Lines 12247 12264 +17
Branches 1039 1038 -1
=============================================
+ Hits 1341 1351 +10
- Misses 10791 10798 +7
Partials 115 115
Continue to review full report at Codecov.
|
870258a
to
f8402b2
Compare
task copyConnectorPlugin(dependsOn: ['jar']) { | ||
doFirst { | ||
new File(projectDir, '../eventmesh-connector-plugin/dist/apps').mkdir() | ||
new File(projectDir, '../dist/plugin/connector').mkdirs() |
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.
may not need dist directory, just $HOME/plugin/connector
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.
eventmesh-runtime/build.gradle
Outdated
@@ -24,14 +24,14 @@ dependencies { | |||
api 'io.prometheus:simpleclient_httpserver' | |||
|
|||
implementation project(":eventmesh-connector-plugin:eventmesh-connector-api") | |||
implementation project(":eventmesh-connector-plugin:eventmesh-connector-standalone") | |||
implementation project(":eventmesh-connector-plugin:eventmesh-connector-rocketmq") |
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.
Set default connector as standalone is ok in my opinion.
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.
Agree with you, done.
task copyAclPlugin(dependsOn: ['jar']) { | ||
doFirst { | ||
new File(projectDir, '../eventmesh-security-plugin/dist/apps').mkdir() | ||
new File(projectDir, '../dist/plugin/security').mkdirs() |
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.
also, do not need dist directory.
private static final String EVENTMESH_EXTENSION_PLUGIN_DIR = System.getProperty("eventMeshPluginDir", | ||
"./dist/plugin"); | ||
Paths.get(".", "dist", "plugin").toString()); |
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.
also, do not need dist directory.
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.
Yes, has removed the dist
.
2. Optimize install plugin, suppory install plugin by ./gradlew jar dist 3. Make UrlClassLoader siglenton
f8402b2
to
b91c48a
Compare
@ruanwenjun please help to fix it, when execute build. FAILURE: Build failed with an exception.
1 error |
* 1. Optimize plugin load, support load plugin by plugin instance name 2. Optimize install plugin, suppory install plugin by ./gradlew jar dist 3. Make UrlClassLoader siglenton * add license header * optimize path * resolve confilct