Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/2309#issuecomment-59099599
Hi @bbejeck,
Sorry for allowing this to sit unreviewed for so long.
I can sort of understand how it could be confusing if an invalid setting in
an overridden configuration led to an error message. However, I think this is
already the case if I set `SPARK_WORKER_MEMORY` to a completely invalid string
that can't be parsed as a number.
We currently seem to have a sort of "bottom-up" way of handling
configuration precedence in this file, where we compute the default
configurations then keep overriding them (e.g. first set the default, then
override it with the environment variable, then override it with the
command-line argument). It sounds like @vanzin is proposing a "top-down"
approach where we first determine which configuration should be used and then
attempt to validate that configuration. I generally prefer the latter
approach, but this seems like kind of a bigger change.
I agree that this issue could potentially affect other locations where we
allow users to configure memory. However, it looks like
`spark.executor.memory` and `spark.driver.memory` are preserved as strings and
passed directly to the JVM rather than being parsed.
I guess that the code in this PR is a strict improvement over what we have
now, so I'm going to merge it. If a more general version of this problem crops
up, let's solve it then.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]