Github user rajeshbalamohan commented on a diff in the pull request:
https://github.com/apache/spark/pull/11911#discussion_r57150734
--- 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 --
Thanks @srowen. In Utils.withDummyCallSite(), both LONG_FORM and
SHORT_FORM are explicitly set to "". But I can see that it is possible to
explicitly set one of them via setCallSite(shortCallSite).
Incorporated your review comments in latest commit.
---
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]