-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[SPARK-12345][MESOS] Filter SPARK_HOME when submitting Spark jobs with Mesos cluster mode. #10332
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,7 +94,12 @@ private[mesos] class MesosSubmitRequestServlet( | |
val driverMemory = sparkProperties.get("spark.driver.memory") | ||
val driverCores = sparkProperties.get("spark.driver.cores") | ||
val appArgs = request.appArgs | ||
val environmentVariables = request.environmentVariables | ||
// We don't want to pass down SPARK_HOME when launching Spark apps | ||
// with Mesos cluster mode since it's populated by default on the client and it will | ||
// cause spark-submit script to look for files in SPARK_HOME instead. | ||
// We only need the ability to specify where to find spark-submit script | ||
// which user can user spark.executor.home or spark.home configurations. | ||
val environmentVariables = request.environmentVariables.filter(!_.equals("SPARK_HOME")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately there is a subtle error here, and this is a no-op. And nobody ran this code, it seems. Here's what happens: Unfortunately this went in RC3 without fixing the bug. It is harmless otherwise, but highlights the fact that there are no easy fixes or safe changes. :-/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's really the problem, I think we should fix this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm interesting I wonder if I ran it differently than what my code have, since I was able to see it not passed through. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, odd. I ran this against DCOS and didn't see the error. |
||
val name = request.sparkProperties.get("spark.app.name").getOrElse(mainClass) | ||
|
||
// Construct driver description | ||
|
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 would add (SPARK-12345) here, but I'll fix this myself on merge.