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.
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
Support loading plugins from multiple directories #7871
Support loading plugins from multiple directories #7871
Changes from all commits
4acfecb
1db47ec
2722e27
f32149c
166d330
197bd5e
cef7a1f
541911a
6c4365b
04ec583
471591e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
shall we check and skip the nested paths?
E.g. one directory is
a/b/c
and one filea/b/c/d.file
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.
@xiangfu0 can you clarify what you mean, so
a/b/c/d.file
would be skipped since it's included already viaa/b/c
?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, if the override happens then it's not a problem to worry.
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.
Please add some comments on why the 1st and 3rd would be fetched.
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.
how does this untar later? If I have
will it come back out the same way?
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.
so the initial createTarGzFile which accepted 1 File obj, also accepted directories with support for recursion too: so let's say I called createTarGzFile with 1 directory (/a/...) that entire one will be tarred and it's children.
now, using the new method if I call it on let's say [ /a/ and /b/ ], the dir name is used as the baseEntryName (see ln 89 in TarGzCompressionUtils.java).
so effectively, if you tar two directories /a/ and /b/, it should come the same way as you pasted above
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 feel it is more common to use
,
as the array separator (e.g. in Apache commons configuration). Is there some special reason why picking;
as the separator here?(minor) Use
StringUtils.split(pluginsDirectories, ',')
for slightly better performance (avoid regex checking)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 used
;
as the plugin to include property also used it to be consistent, but I am fine with changing it to,
, what do you think?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.
+1 to priyen. plugins themselves use
;
. and most PATH-like things use;
as well?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 just realized that the
pluginsInclude
separator is changed from ',' to ';' in this PR which can cause backward incompatibility. Does it make sense to allow both as separator?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.
This is a bit odd, the master bash code in
pinot-tools/src/main/resources/appAssemblerScriptTemplate
is usingexport IFS=";"
when looping through$PLUGINS_INCLUDE
..now I'm wondering ifpinot-spi/src/main/java/org/apache/pinot/spi/plugin/PluginManager.java
ln 157pluginsToLoad = Arrays.asList(pluginsInclude.split(","));
in master was even working in the first place..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.
@xiangfu0 Can you please take a look?
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.
friendly ping, any ideas?
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.
Right now Pinot uses
appAssemblerScriptTemplate
to set all the plugins into java classpath.So far let's use semi-colon to make the delimiter.
For PluginManager.java, we should also follow the same delimiter convention to use semi-colon. For
pluginInclude
, we can make the colon as backward compatible.