-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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-1469: Scheduler mode should accept lower-case definitions and have... #388
Conversation
Can one of the admins verify this patch? |
@pwendell can you review this ? |
SchedulingMode.withName(conf.get("spark.scheduler.mode", "FIFO").toUpperCase) | ||
} catch { | ||
case e: java.util.NoSuchElementException => | ||
throw new SparkException("spark scheduler mode not available", e) |
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 good start, but if you look at the JIRA, this exception won't actually echo back to the user the name they provided, which is bad form. I think you should capture the argument the user provided first then echo it back to them:
private val schedulingModeConf = conf.get("spark.scheduler.mode", "FIFO")
val schedulingMode: SchedulingMode = try {
SchedulingMode.withName(schedulingModeConf).toUpperCase)
} catch {
case e: java.util.NoSuchElementException =>
throw new SparkException(s"unrecognized spark.scheduler.mode: $schedulingModeConf")
}
Don't even bother re-sending the NoSuchElementException... it doesn't convey anything useful to the user.
…ave nicer error messages There are two improvements to Scheduler Mode: 1. Made the built in ones case insensitive (fair/FAIR, fifo/FIFO). 2. If an invalid mode is given we should print a better error message.
Jenkins, test this please. |
Merged build triggered. |
Merged build started. |
Merged build finished. All automated tests passed. |
All automated tests passed. |
Cool - thanks for this! |
I've merged this. |
…ave... ... nicer error messages There are two improvements to Scheduler Mode: 1. Made the built in ones case insensitive (fair/FAIR, fifo/FIFO). 2. If an invalid mode is given we should print a better error message. Author: Sandeep <[email protected]> Closes #388 from techaddict/1469 and squashes the following commits: a31bbd5 [Sandeep] SPARK-1469: Scheduler mode should accept lower-case definitions and have nicer error messages There are two improvements to Scheduler Mode: 1. Made the built in ones case insensitive (fair/FAIR, fifo/FIFO). 2. If an invalid mode is given we should print a better error message. (cherry picked from commit e269c24) Signed-off-by: Patrick Wendell <[email protected]>
…ave... ... nicer error messages There are two improvements to Scheduler Mode: 1. Made the built in ones case insensitive (fair/FAIR, fifo/FIFO). 2. If an invalid mode is given we should print a better error message. Author: Sandeep <[email protected]> Closes apache#388 from techaddict/1469 and squashes the following commits: a31bbd5 [Sandeep] SPARK-1469: Scheduler mode should accept lower-case definitions and have nicer error messages There are two improvements to Scheduler Mode: 1. Made the built in ones case insensitive (fair/FAIR, fifo/FIFO). 2. If an invalid mode is given we should print a better error message.
…ernetes-g Branch 2.2 kubernetes
Change flavor to boot server in FusionCloud job
* KE-34191 replace partition Table path * change pom version
... nicer error messages
There are two improvements to Scheduler Mode: