Skip to content

Conversation

@mgummelt
Copy link

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

@mgummelt mgummelt force-pushed the mesos-module branch 2 times, most recently from 57a191b to 465929e Compare August 14, 2016 18:37
mesos/pom.xml Outdated
Copy link
Contributor

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?

Copy link
Author

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.

@SparkQA
Copy link

SparkQA commented Aug 14, 2016

Test build #63753 has finished for PR 14637 at commit 57a191b.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

mesos/pom.xml Outdated
Copy link
Contributor

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?

Copy link
Author

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.

@SparkQA
Copy link

SparkQA commented Aug 14, 2016

Test build #63754 has finished for PR 14637 at commit 465929e.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 15, 2016

Test build #63765 has finished for PR 14637 at commit 4e276ab.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@srowen
Copy link
Member

srowen commented Aug 15, 2016

Directionally this is looking spot on, thank you. Ping when you want a review.

@mgummelt mgummelt force-pushed the mesos-module branch 2 times, most recently from 1e9a0db to 21dc917 Compare August 19, 2016 23:08
Copy link
Author

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.

Copy link
Contributor

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.

@mgummelt
Copy link
Author

@srowen Ready for review.

@SparkQA
Copy link

SparkQA commented Aug 19, 2016

Test build #64109 has finished for PR 14637 at commit 95e473b.

  • This patch fails MiMa tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgummelt
Copy link
Author

mima seems to be upset about my removal of MESOS_REGEX from SparkMasterRegex, but I don't understand why, as it's a private class. Should I add an entry to MimaExcludes?

</exclusions>
</dependency>

<dependency>
Copy link
Member

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.

Copy link
Author

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.

Copy link
Contributor

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.

Copy link
Author

@mgummelt mgummelt Aug 23, 2016

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.

Copy link
Contributor

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).

Copy link
Contributor

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.)

Copy link
Author

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.

@srowen
Copy link
Member

srowen commented Aug 20, 2016

You can ignore the MiMa error and suppress it, yes.
This is generally looking great, thanks. @vanzin would be a good reviewer too.

I think we'll have to change the Jenkins job config later to set -Pmesos -- will see about it.
There are some other miscellaneous places that may need to add the new profile, dev/:

  • lint-java, scalastyle
  • mima add to the profiles it uses for MiMa
  • create-release/release-build.sh I assume the default tarballs will still build in Mesos

Although it's kind of dead config, you might add the profile to .travis.yml too.

@vanzin
Copy link
Contributor

vanzin commented Aug 23, 2016

If this is ready for review could you remove "wip" from the pr title?

@vanzin
Copy link
Contributor

vanzin commented Aug 23, 2016

Also, with the current changes, doesn't it mean the PR builder is not building the mesos code? Shouldn't you modify dev/run-tests.py (I think that's the right place)?

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 dev/create-release/release-build.sh depending on the answer.

@srowen
Copy link
Member

srowen commented Aug 23, 2016

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.

@mgummelt
Copy link
Author

@srowen OK, added the profile to:

  • .travis.yml
  • release-build.sh
  • lint-java
  • mima
  • scalastyle

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?

@mgummelt mgummelt changed the title [WIP] [SPARK-16967] move mesos to module [SPARK-16967] move mesos to module Aug 23, 2016
@srowen
Copy link
Member

srowen commented Aug 23, 2016

Yes to all three of those.

@SparkQA
Copy link

SparkQA commented Aug 23, 2016

Test build #64301 has finished for PR 14637 at commit e94f5e7.

  • This patch fails executing the dev/run-tests script.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 23, 2016

Test build #64302 has finished for PR 14637 at commit fe7d05e.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 23, 2016

Test build #64299 has finished for PR 14637 at commit 3e10acc.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 23, 2016

Test build #64303 has finished for PR 14637 at commit 05614b4.

  • This patch fails from timeout after a configured wait of 250m.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 23, 2016

Test build #64312 has finished for PR 14637 at commit cdc5753.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgummelt
Copy link
Author

retest this please

@SparkQA
Copy link

SparkQA commented Aug 24, 2016

Test build #64317 has finished for PR 14637 at commit cdc5753.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgummelt
Copy link
Author

retest this please

@SparkQA
Copy link

SparkQA commented Aug 24, 2016

Test build #64370 has finished for PR 14637 at commit cdc5753.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgummelt
Copy link
Author

@srowen Ready for review

@srowen
Copy link
Member

srowen commented Aug 25, 2016

Nice one, LGTM. I'll leave it open for final comments until tomorrow.

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" &
Copy link
Contributor

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).

Copy link
Author

Choose a reason for hiding this comment

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

ah, yea. fixing...

@vanzin
Copy link
Contributor

vanzin commented Aug 25, 2016

LGTM now.

@SparkQA
Copy link

SparkQA commented Aug 25, 2016

Test build #64430 has finished for PR 14637 at commit 09f3197.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgummelt
Copy link
Author

retest this please

@SparkQA
Copy link

SparkQA commented Aug 25, 2016

Test build #64435 has finished for PR 14637 at commit 09f3197.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Aug 26, 2016

Merging to master.

@asfgit asfgit closed this in 8e5475b Aug 26, 2016
@mgummelt mgummelt deleted the mesos-module branch September 6, 2016 21:15
@drcrallen
Copy link
Contributor

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

@srowen
Copy link
Member

srowen commented Feb 6, 2017

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.

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.

6 participants