GitHub user LantaoJin opened a pull request:
https://github.com/apache/spark/pull/18243
[SPARK-21023][Submit] Ignore to load default properties file is not aâ¦
⦠good choice from the perspective of system
## What changes were proposed in this pull request?
The default properties file spark-defaults.conf shouldn't be ignore to load
even though the submit arg --properties-file is set. The reasons are very easy
to see:
1. Infrastructure team need continually update the spark-defaults.conf when
they want set something as default for entire cluster as a tuning purpose.
2. Application developer only want to override the parameters they really
want rather than others they even doesn't know (Set by infrastructure team).
3. The purpose of using --properties-file from most of application
developers is to avoid setting dozens of --conf k=v. But if spark-defaults.conf
is ignored, the behaviour becomes unexpected finally.
All this caused by below codes:
```
private Properties loadPropertiesFile() throws IOException {
Properties props = new Properties();
File propsFile;
if (propertiesFile != null) {
// default conf property file will not be loaded when app developer use
--properties-file as a submit args
propsFile = new File(propertiesFile);
checkArgument(propsFile.isFile(), "Invalid properties file '%s'.",
propertiesFile);
} else {
propsFile = new File(getConfDir(), DEFAULT_PROPERTIES_FILE);
}
//...
return props;
}
```
## How was this patch tested?
Modify the UT of SparkSubmitCommandBuilderSuite.java
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/LantaoJin/spark SPARK-21023
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/18243.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18243
----
commit dae3a00dd349968294e304a24ea0fd4d01c93d22
Author: LantaoJin <[email protected]>
Date: 2017-06-08T17:33:20Z
[SPARK-21023][Submit] Ignore to load default properties file is not a good
choice from the perspective of system
----
---
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]