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

Sean Owen commented on SPARK-6630:
----------------------------------

Yeah because the second argument becomes a Function producing a String, not a 
String. Code compiled against older versions of Spark are expected to run as 
much as possible on newer ones and the old code would not find the String 
method. We could add an overload, but then I am not sure what happens to the 
current code. I think code continues to bind to the String overload, defeating 
the purpose.

> SparkConf.setIfMissing should only evaluate the assigned value if indeed 
> missing
> --------------------------------------------------------------------------------
>
>                 Key: SPARK-6630
>                 URL: https://issues.apache.org/jira/browse/SPARK-6630
>             Project: Spark
>          Issue Type: Improvement
>          Components: Spark Core
>    Affects Versions: 1.3.0
>            Reporter: Svend Vanderveken
>            Priority: Minor
>
> The method setIfMissing() in SparkConf is currently systematically evaluating 
> the right hand side of the assignment even if not used. This leads to 
> unnecessary computation, like in the case of 
> {code}
>   conf.setIfMissing("spark.driver.host", Utils.localHostName())
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to