Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
set active SQLContext manually
  • Loading branch information
mengxr committed Nov 13, 2015
commit 1a2a8661adb01baf5bd18ea400833441732fbd5d
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private[util] sealed trait BaseReadWrite {
*/
protected final def sqlContext: SQLContext = {
if (optionSQLContext.isEmpty) {
optionSQLContext = Some(new SQLContext(SparkContext.getOrCreate()))
optionSQLContext = Some(SQLContext.getOrCreate(SparkContext.getOrCreate()))
}
optionSQLContext.get
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ trait MLlibTestSparkContext extends BeforeAndAfterAll { self: Suite =>
sc = new SparkContext(conf)
SQLContext.clearActive()
sqlContext = new SQLContext(sc)
SQLContext.setActive(sqlContext)
}

override def afterAll() {
Expand Down