-
Notifications
You must be signed in to change notification settings - Fork 29k
Assorted clean-up for Spark-on-YARN. #488
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
Changes from 2 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 |
|---|---|---|
|
|
@@ -116,6 +116,17 @@ private[spark] class SparkSubmitArguments(args: Array[String]) { | |
| if (args.length == 0) printUsageAndExit(-1) | ||
| if (primaryResource == null) SparkSubmit.printErrorAndExit("Must specify a primary resource") | ||
| if (mainClass == null) SparkSubmit.printErrorAndExit("Must specify a main class with --class") | ||
| val testing = sys.env.contains("SPARK_TESTING") | ||
| if (master.startsWith("yarn")) { | ||
| val hasHadoopEnv = testing || | ||
| sys.env.contains("HADOOP_CONF_DIR") || | ||
| sys.env.contains("YARN_CONF_DIR") | ||
|
|
||
| if (!hasHadoopEnv) { | ||
|
Contributor
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. super small nit: I meant something more like
Contributor
Author
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. Ah that makes way more sense. Thanks |
||
| throw new Exception(s"When running with master '$master' " + | ||
| "either HADOOP_CONF_DIR or YARN_CONF_DIR must be set in the environment.") | ||
| } | ||
| } | ||
| } | ||
|
|
||
| override def toString = { | ||
|
|
||
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.
should this be under "Options read in YARN client mode"?
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 added it there as well, but I'm going to leave it here because it's relevant also to yarn-cluster.