-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Remove Maven client at runtime + Provide a way to load Druid extensions through local file system #1638
Conversation
b9b48ae
to
68d7b9d
Compare
Close and reopen to restart the build. |
ce3c742
to
8ce526a
Compare
ca4574f
to
4450881
Compare
|
||
If you don't specify `druid.extensions.toLoad`, Druid will load all the extensions under root extension directory. | ||
|
||
### How to prepare extensions directories using `tools pull-deps`? |
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 this should be the default option as it is the easier option and be placed before the instructions to load manual setup.
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 think if we keep including all the base extensions in release tarballs (like @xvrl's newer 0.8.1 builds) then this point is not too important, since most people will be using the prebuilt extensions dir. Only people wanting to use their own extensions would have to decide how to get the jars.
@guobingkun I have a few minor comments but overall I am extremely excited for this to get merged. How backwards compatible is this? It seems like it is backwards compatible and we don't need to update the 0.x version. |
@@ -33,10 +34,6 @@ | |||
@NotNull | |||
private boolean searchCurrentClassloader = true; | |||
|
|||
@JsonProperty | |||
@NotNull | |||
private List<String> coordinates = ImmutableList.of(); |
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.
Can this actually be left in, and give an error at startup if it is specified?
There doesn't seem to be a migration plan overall here. (or I could have just missed 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 believe it's sufficient to mention this deprecation in the release note? Even if people set this property, it will be ignored and not cause any harm.
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.
not cause any harm
Not true, if they didn't realize one of the nodes had not been updated to the "new" config, then it will not launch properly, or will have missing functionality that may not even report on bootup.
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.
Not sure if I fully understand this. Are you worrying about people not being aware of one of the nodes hadn't been updated to the latest version? If that node fails on bootup then people will realize it's not updated properly. If that node just runs the old version silently, then failing on "specifying druid.extensions.coordinates
" will not help either since that node didn't pick up this code. Or did I miss something?
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.
If someone is updating their cluster to the latest binaries, it could be easy for them to miss the release notes that the druid.extensions.coordinates
changed. And it can cause late failures.
Since the config change is not handled at start time, and there is no migration method to warn people of the config change (other than release notes) AND failure to migrate to the new config can cause node failure due to extensions not being present when they are expected to be present, that would make this PR an incompatible change.
Personally, I'm ok with eliminating the setting provided that there is an informative error on startup (or even better, an informative warning and transparent handling of migration until next major version release). Would be worth getting input from the other contributors though.
👍 But before merging we should decide on the new version of Druid and mysql packaging |
|
||
5. Once all dependencies have been downloaded successfully, replicate the `repo` directory to the machine behind the firewall; e.g. `/opt/druid-<version>/repo` | ||
6. Create property `druid.extensions.localRepository=`*`path to repo directory`* in the *`Druid Directory`*`/config/_common/common.runtime.properties` file; e.g. `druid.extensions.localRepository=/opt/druid-<version>/repo` | ||
When you are behind a firewall, the IRC wikipedia channels that feed realtime data into Druid will not be accessible. To workaround this challenge, you will need to make the Wikipedia example GeoLite DB dependency available offline, see below. |
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 sentence is a bit confusing, making GeoLite avaible offline will not solve the IRC problem as the sentence implies.
There are two problems, one is that IRC may be firewalled, in which case there's nothing you can do. The other problem is that downloading data from maxmind may not be possible, in which case GeoLite needs to be downloaded offline.
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.
updated the doc so that it reflects your comment.
@cheddar unless we relicense the mysql metadata store code under GPL, I don't see how packaging it as a separate tarball would make a difference? |
Assuming this has been tested, other than my last few comments about docs, and maybe resolve the mysql tabarll issue outside of this PR, I'm 👍 |
try { | ||
URLClassLoader loader = getClassLoaderForCoordinates(aether, coordinate, config.getDefaultVersion()); | ||
if (config.searchCurrentClassloader()) { | ||
for (T module : ServiceLoader.load(clazz, Thread.currentThread().getContextClassLoader())) { |
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.
ServiceLoader.load checks context classloader automatically, but it probably doesn't hurt to have it here.
This is looking good! As a note, it is blocked until https://groups.google.com/d/msg/druid-development/KXpLwUisJcU/eCM3GfgPBAAJ is resolved |
ef1d59d
to
2acd649
Compare
2acd649
to
a18d62f
Compare
@guobingkun I think this is ready to merge, can you please cleanup the merge conflicts? |
a18d62f
to
05aa0b3
Compare
@drcrallen Conflicts resolved. |
05aa0b3
to
f4a8fa6
Compare
1) Remove maven client from downloading extensions at runtime. 2) Provide a way to load Druid extensions and hadoop dependencies through file system. 3) Refactor pull-deps so that it can download extensions into extension directories. 4) Add documents on how to use this new extension loading mechanism. 5) Change the way how Druid tarball is generated. Now all the extensions + hadoop-client 2.3.0 are packaged within the Druid tarball.
f4a8fa6
to
4914925
Compare
Remove Maven client at runtime + Provide a way to load Druid extensions through local file system
<goal>single</goal> | ||
</goals> | ||
<configuration> | ||
<finalName>mysql-metdata-storage</finalName> |
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.
Is this a typo?
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.
@se7entyse7en Thanks! That's definitely a typo, I will send a PR to fix it.
This is weird, #2067 but this still passed travis |
This is a follow up of https://groups.google.com/forum/#!searchin/druid-development/proposal/druid-development/7KJCsQ9GvGo/u3XMyNLmeAIJ
This pull request does the following,