You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/03/25 06:59:50 UTC

[GitHub] [spark] viirya commented on a change in pull request #31953: [SPARK-34855][CORE]spark context - avoid using local lazy val for callSite

viirya commented on a change in pull request #31953:
URL: https://github.com/apache/spark/pull/31953#discussion_r601119737



##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -2186,13 +2186,22 @@ class SparkContext(config: SparkConf) extends Logging {
    * has overridden the call site using `setCallSite()`, this will return the user's version.
    */
   private[spark] def getCallSite(): CallSite = {
-    lazy val callSite = Utils.getCallSite()
-    CallSite(
-      Option(getLocalProperty(CallSite.SHORT_FORM)).getOrElse(callSite.shortForm),
-      Option(getLocalProperty(CallSite.LONG_FORM)).getOrElse(callSite.longForm)
-    )
+    if (getLocalProperty(CallSite.SHORT_FORM) == null

Review comment:
       Is this easy to add test? Otherwise we can also show up how to reproduce it manually in the description.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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