File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
main/scala/org/apache/spark/ml/util
test/scala/org/apache/spark/mllib/util Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ private[util] sealed trait BaseReadWrite {
5050 */
5151 protected final def sqlContext : SQLContext = {
5252 if (optionSQLContext.isEmpty) {
53- optionSQLContext = Some (new SQLContext (SparkContext .getOrCreate()))
53+ optionSQLContext = Some (SQLContext .getOrCreate (SparkContext .getOrCreate()))
5454 }
5555 optionSQLContext.get
5656 }
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ trait MLlibTestSparkContext extends BeforeAndAfterAll { self: Suite =>
3434 sc = new SparkContext (conf)
3535 SQLContext .clearActive()
3636 sqlContext = new SQLContext (sc)
37+ SQLContext .setActive(sqlContext)
3738 }
3839
3940 override def afterAll () {
You can’t perform that action at this time.
0 commit comments