Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11911#discussion_r57149156
  
    --- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
    @@ -1745,11 +1745,16 @@ class SparkContext(config: SparkConf) extends 
Logging with ExecutorAllocationCli
        * has overridden the call site using `setCallSite()`, this will return 
the user's version.
        */
       private[spark] def getCallSite(): CallSite = {
    -    val callSite = Utils.getCallSite()
    -    CallSite(
    -      
Option(getLocalProperty(CallSite.SHORT_FORM)).getOrElse(callSite.shortForm),
    -      
Option(getLocalProperty(CallSite.LONG_FORM)).getOrElse(callSite.longForm)
    -    )
    +    var (shortForm, longForm) = (getLocalProperty(CallSite.SHORT_FORM),
    +      getLocalProperty(CallSite.LONG_FORM))
    +
    +    if (shortForm == null || longForm == null) {
    +      val callSite = Utils.getCallSite()
    +      shortForm = callSite.shortForm
    --- End diff --
    
    Better, but now it will overwrite both props if either is null. That's 
slightly different behavior from before. It may be true that they're always 
both null or not null; if that's pretty sure then we can leave this. Otherwise 
you may need `= Option(shortForm).getOrElse(callSite.shortForm)`?


---
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]

Reply via email to