-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-16967] move mesos to module #14637
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
57a191b to
465929e
Compare
mesos/pom.xml
Outdated
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.
Isn't the line too long?
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 don't think line length rules apply to XML. See the other poms for examples.
|
Test build #63753 has finished for PR 14637 at commit
|
mesos/pom.xml
Outdated
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.
Why do we need that commented-out section?
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 WIP. Please wait to comment.
|
Test build #63754 has finished for PR 14637 at commit
|
|
Test build #63765 has finished for PR 14637 at commit
|
|
Directionally this is looking spot on, thank you. Ping when you want a review. |
1e9a0db to
21dc917
Compare
project/SparkBuild.scala
Outdated
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.
FYI I'm just pattern matching here to get -Pmesos to work with sbt. I have no idea what this does.
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 pattern matching on assignment feature in Scala and the line creates one optionallyEnabledProjects value for the entire Seq of projects with respective projects being their own values mesos etc.
|
@srowen Ready for review. |
|
Test build #64109 has finished for PR 14637 at commit
|
|
mima seems to be upset about my removal of MESOS_REGEX from |
| </exclusions> | ||
| </dependency> | ||
|
|
||
| <dependency> |
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 don't know that you need these dependencies -- literally don't know either way by looking. These are definitely needed? I was wondering whether jetty was relevant.
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 now removed mockito, because it was already a dependency of the parent project.
I'm pretty sure all of the shaded deps need to be listed. I don't know why they're shaded in the first place, but since they are, they must be listed here to avoid classloading errors at runtime.
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.
You shouldn't need to touch the shaded dependencies (see how no other module does that). If you're running into problems, you're probably missing something else, so post the error so we can 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.
YARN does it: https://github.com/apache/spark/blob/master/yarn/pom.xml#L79
which is what I was using as a starting point. I initially did try to remove them, but got a ClassNotFoundException in WebUI.class when trying to import org.eclipse.jetty.. I can try to repro and get more info if you need.
The parent project seems to rename org.eclipse.jetty to org.spark_project.jetty https://github.com/apache/spark/blob/master/pom.xml#L2273
It's documented that the shaded deps should be put into compile scope in the module: https://github.com/apache/spark/blob/master/pom.xml#L315
Though I still don't understand a) why they're shaded in the first place, and b) how those classes are loaded when spark is built without a module that promotes those dependencies to compile scope.
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.
They're shaded because people want to use different versions of guava and jetty.
Spark doesn't need to promote them to compile scope because the relocated guava / jetty classes are packaged with Spark itself.
I see what they problem you're running into is now. It has nothing to do with compile scope, you just need to explicit list the dependencies because the mesos code references them directly. So you actually just need to fix the comment since you're not promoting anything to compile scope by explicitly adding the dependencies (they still inherit the scope from the parent pom, which is "provided", and is actually what you want here).
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.
(Note to self: YARN - and this new mesos module - should only need to declare the Guava dependency explicitly, since they don't use Jetty directly.)
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.
Ah, I didn't realize the intransitivity of provided dependencies applied to inheritance as well.
|
You can ignore the MiMa error and suppress it, yes. I think we'll have to change the Jenkins job config later to set
Although it's kind of dead config, you might add the profile to |
|
If this is ready for review could you remove "wip" from the pr title? |
|
Also, with the current changes, doesn't it mean the PR builder is not building the mesos code? Shouldn't you modify The modification to the dependency files also raises another question: how will this be made available to users? Will there be a new package "spark-with-mesos" that needs to be packaged separately? Will users add it with "--packages" instead? There might be changes needed to |
|
Good call, I think it's dev/sparktests/modules.py that needs to be modified. it can clone YARN's config. I assume that the release binaries will have this profile activated as with YARN. |
|
@srowen OK, added the profile to:
What about dev/test-dependencies.sh. Also, I added mesos to PUBLISH_PROFILES in release-build.sh. Should I also add it to the make_binary_release profiles? |
|
Yes to all three of those. |
|
Test build #64301 has finished for PR 14637 at commit
|
|
Test build #64302 has finished for PR 14637 at commit
|
|
Test build #64299 has finished for PR 14637 at commit
|
|
Test build #64303 has finished for PR 14637 at commit
|
|
Test build #64312 has finished for PR 14637 at commit
|
|
retest this please |
|
Test build #64317 has finished for PR 14637 at commit
|
|
retest this please |
|
Test build #64370 has finished for PR 14637 at commit
|
|
@srowen Ready for review |
|
Nice one, LGTM. I'll leave it open for final comments until tomorrow. |
dev/create-release/release-build.sh
Outdated
| make_binary_release "without-hadoop" "-Psparkr -Phadoop-provided -Pyarn" "3038" & | ||
| FLAGS="-Psparkr -Phadoop-2.3 -Phive -Phive-thriftserver -Pyarn -Pmesos" | ||
| make_binary_release "hadoop2.3" "$FLAGS" "3033" & | ||
| make_binary_release "hadoop2.4" "$FLAGS" "3034" & |
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 wrong now; "FLAGS" enables "-Phadoop-2.3" when here it shuold be "-Phadoop-2.4" (and matching versions in the lines 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.
ah, yea. fixing...
|
LGTM now. |
|
Test build #64430 has finished for PR 14637 at commit
|
|
retest this please |
|
Test build #64435 has finished for PR 14637 at commit
|
|
Merging to master. |
|
FYI, we have a build process that packages spark core, now that mesos is is in its own artifact, this broke our build and deploy process, and its not called out in release notes |
|
The release notes are for end users, and this doesn't impact end users. Developers are expected, more or less, to follow commits and dev@ to keep up with changes like this. |
What changes were proposed in this pull request?
Move Mesos code into a mvn module
How was this patch tested?
unit tests
manually submitting a client mode and cluster mode job
spark/mesos integration test suite