-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-1779] Throw an exception if memory fractions are not between 0 and 1 #714
Changes from 10 commits
7b899c2
a59d76b
764965f
dff1f0f
14d18ac
cf38bcf
43621bd
2e79b3d
fc45476
717c0ca
829a195
da6ee59
6e385b9
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 |
---|---|---|
|
@@ -236,6 +236,18 @@ class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging { | |
} | ||
} | ||
|
||
// Validate memoryFraction | ||
val memoryKeys = Seq( | ||
"spark.storage.memoryFraction", | ||
"spark.shuffle.memoryFraction", | ||
"spark.shuffle.safetyFraction") | ||
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. We should add the relevant configs introduced in #1165. In particular |
||
for (key -> memoryKeys) { | ||
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. Tests are failing because this should be |
||
val value = getDouble(key, 0.5) | ||
if (value > 1 || value < 0) { | ||
throw new IllegalArgumentException("$key should be between 0 and (was '$value').") | ||
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. missing indent |
||
} | ||
} | ||
|
||
// Check for legacy configs | ||
sys.env.get("SPARK_JAVA_OPTS").foreach { value => | ||
val error = | ||
|
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.
nit: this is no longer only
memoryFraction
. Maybe use "Validate memory fractions" instead