aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorShixiong Zhu <shixiong@databricks.com>2016-05-17 14:57:21 -0700
committerYin Huai <yhuai@databricks.com>2016-05-17 14:57:21 -0700
commit8e8bc9f957de6c0aefbc6ef4b18c421b486477a6 (patch)
tree2000e56af79abe0cbdb8580fd01209c8c418f6d3 /core
parent0f576a5748244f7e874b925f8d841f1ca238f087 (diff)
downloadspark-8e8bc9f957de6c0aefbc6ef4b18c421b486477a6.tar.gz
spark-8e8bc9f957de6c0aefbc6ef4b18c421b486477a6.tar.bz2
spark-8e8bc9f957de6c0aefbc6ef4b18c421b486477a6.zip
[SPARK-11735][CORE][SQL] Add a check in the constructor of SQLContext/SparkSession to make sure its SparkContext is not stopped
## What changes were proposed in this pull request? Add a check in the constructor of SQLContext/SparkSession to make sure its SparkContext is not stopped. ## How was this patch tested? Jenkins unit tests. Author: Shixiong Zhu <shixiong@databricks.com> Closes #13154 from zsxwing/check-spark-context-stop.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/SparkContext.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/SparkContext.scala b/core/src/main/scala/org/apache/spark/SparkContext.scala
index e391599336..e6cdd0d298 100644
--- a/core/src/main/scala/org/apache/spark/SparkContext.scala
+++ b/core/src/main/scala/org/apache/spark/SparkContext.scala
@@ -94,7 +94,7 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
private[spark] val stopped: AtomicBoolean = new AtomicBoolean(false)
- private def assertNotStopped(): Unit = {
+ private[spark] def assertNotStopped(): Unit = {
if (stopped.get()) {
val activeContext = SparkContext.activeContext.get()
val activeCreationSite =