You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Marcelo Vanzin (JIRA)" <ji...@apache.org> on 2017/06/08 17:11:19 UTC

[jira] [Comment Edited] (SPARK-21023) Ignore to load default properties file is not a good choice from the perspective of system

    [ https://issues.apache.org/jira/browse/SPARK-21023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043053#comment-16043053 ] 

Marcelo Vanzin edited comment on SPARK-21023 at 6/8/17 5:11 PM:
----------------------------------------------------------------

I thought we had an issue for adding a user-specific config file that is loaded on top of the defaults, but I can't find it. In any case, changing the current behavior is not really desired, but you can add this as a new feature without changing the current behavior.


was (Author: vanzin):
I thought we have an issue for adding a user-specific config file that is loaded on top of the defaults, but I can't find it. In any case, changing the current behavior is not really desired, but you can add this as a new feature without changing the current behavior.

> Ignore to load default properties file is not a good choice from the perspective of system
> ------------------------------------------------------------------------------------------
>
>                 Key: SPARK-21023
>                 URL: https://issues.apache.org/jira/browse/SPARK-21023
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Submit
>    Affects Versions: 2.1.1
>            Reporter: Lantao Jin
>            Priority: Minor
>
> 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:
> * Infrastructure team need continually update the {{spark-defaults.conf}} when they want set something as default for entire cluster as a tuning purpose.
> * Application developer only want to override the parameters they really want rather than others they even doesn't know (Set by infrastructure team).
> * 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:
> {code}
>   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;
>   }
> {code}
> I can offer a patch to fix it if you think it make sense.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org