Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/3121#discussion_r20395305
--- Diff: core/src/main/scala/org/apache/spark/SparkContext.scala ---
@@ -1417,6 +1427,97 @@ class SparkContext(config: SparkConf) extends
SparkStatusAPI with Logging {
*/
object SparkContext extends Logging {
+ /**
+ * Lock that guards access to global variables that track SparkContext
construction.
+ */
+ private[spark] val SPARK_CONTEXT_CONSTRUCTOR_LOCK = new Object()
+
+ /**
+ * Records the creation site of the active, fully-constructed
SparkContext. If no SparkContext
+ * is active, then this is `None`.
+ *
+ * Access to this field is guarded by SPARK_CONTEXT_CONSTRUCTOR_LOCK
+ */
+ private[spark] var activeContextCreationSite: Option[CallSite] = None
--- End diff --
That's a good idea; I think that the current variable is a holdover from an
earlier version of this PR in which we might want to log the call site of a
partially-constructed SparkContext. I'll fix this.
---
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]