File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
main/scala/org/apache/spark/sql
test/scala/org/apache/spark/sql/execution/ui Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1217,6 +1217,7 @@ class SQLContext private[sql](
12171217 sparkContext.addSparkListener(new SparkListener {
12181218 override def onApplicationEnd (applicationEnd : SparkListenerApplicationEnd ): Unit = {
12191219 SQLContext .clearInstantiatedContext(self)
1220+ SQLContext .clearSqlListener()
12201221 }
12211222 })
12221223
Original file line number Diff line number Diff line change @@ -343,6 +343,7 @@ class SQLListenerMemoryLeakSuite extends SparkFunSuite {
343343 .set(" spark.sql.ui.retainedExecutions" , " 50" ) // Set it to 50 to run this test quickly
344344 val sc = new SparkContext (conf)
345345 try {
346+ SQLContext .clearSqlListener()
346347 val sqlContext = new SQLContext (sc)
347348 import sqlContext .implicits ._
348349 // Run 100 successful executions and 100 failed executions.
You can’t perform that action at this time.
0 commit comments