aboutsummaryrefslogtreecommitdiff
path: root/mllib/src/main/scala
diff options
context:
space:
mode:
authorYin Huai <yhuai@databricks.com>2016-05-26 16:53:31 -0700
committerYin Huai <yhuai@databricks.com>2016-05-26 16:53:31 -0700
commit3ac2363d757cc9cebc627974f17ecda3a263efdf (patch)
tree19f223d182ca9f1f077d1c383c91d0936c0c7385 /mllib/src/main/scala
parente7082caeb4a53c1ee172d136894eece1ac880f65 (diff)
downloadspark-3ac2363d757cc9cebc627974f17ecda3a263efdf.tar.gz
spark-3ac2363d757cc9cebc627974f17ecda3a263efdf.tar.bz2
spark-3ac2363d757cc9cebc627974f17ecda3a263efdf.zip
[SPARK-15532][SQL] SQLContext/HiveContext's public constructors should use SparkSession.build.getOrCreate
## What changes were proposed in this pull request? This PR changes SQLContext/HiveContext's public constructor to use SparkSession.build.getOrCreate and removes isRootContext from SQLContext. ## How was this patch tested? Existing tests. Author: Yin Huai <yhuai@databricks.com> Closes #13310 from yhuai/SPARK-15532.
Diffstat (limited to 'mllib/src/main/scala')
-rw-r--r--mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala b/mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala
index adbcdd302a..4bba2ea057 100644
--- a/mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala
+++ b/mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala
@@ -437,7 +437,7 @@ class LogisticRegressionWithLBFGS
lr.setMaxIter(optimizer.getNumIterations())
lr.setTol(optimizer.getConvergenceTol())
// Convert our input into a DataFrame
- val sqlContext = new SQLContext(input.context)
+ val sqlContext = SQLContext.getOrCreate(input.context)
import sqlContext.implicits._
val df = input.map(_.asML).toDF()
// Determine if we should cache the DF