Repository: spark Updated Branches: refs/heads/master b83b502c4 -> ae9e42479
[SQL][MINOR][TEST] Set spark.unsafe.exceptionOnMemoryLeak to true ## What changes were proposed in this pull request? When running IntelliJ, we are unable to capture the exception of memory leak detection. > org.apache.spark.executor.Executor: Managed memory leak detected Explicitly setting `spark.unsafe.exceptionOnMemoryLeak` in SparkConf when building the SparkSession, instead of reading it from system properties. ## How was this patch tested? N/A Author: gatorsmile <gatorsm...@gmail.com> Closes #18967 from gatorsmile/setExceptionOnMemoryLeak. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/ae9e4247 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/ae9e4247 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/ae9e4247 Branch: refs/heads/master Commit: ae9e42479253a9cd30423476405377f2d7952137 Parents: b83b502 Author: gatorsmile <gatorsm...@gmail.com> Authored: Thu Aug 17 13:00:37 2017 -0700 Committer: gatorsmile <gatorsm...@gmail.com> Committed: Thu Aug 17 13:00:37 2017 -0700 ---------------------------------------------------------------------- .../test/scala/org/apache/spark/sql/test/SharedSQLContext.scala | 4 +++- .../src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/ae9e4247/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala ---------------------------------------------------------------------- diff --git a/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala b/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala index 5ec76a4..1f073d5 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/test/SharedSQLContext.scala @@ -31,7 +31,9 @@ import org.apache.spark.sql.{SparkSession, SQLContext} trait SharedSQLContext extends SQLTestUtils with BeforeAndAfterEach with Eventually { protected def sparkConf = { - new SparkConf().set("spark.hadoop.fs.file.impl", classOf[DebugFilesystem].getName) + new SparkConf() + .set("spark.hadoop.fs.file.impl", classOf[DebugFilesystem].getName) + .set("spark.unsafe.exceptionOnMemoryLeak", "true") } /** http://git-wip-us.apache.org/repos/asf/spark/blob/ae9e4247/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---------------------------------------------------------------------- diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala index 9e15baa..10c9a2d 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala @@ -55,7 +55,8 @@ object TestHive "org.apache.spark.sql.hive.execution.PairSerDe") .set("spark.sql.warehouse.dir", TestHiveContext.makeWarehouseDir().toURI.getPath) // SPARK-8910 - .set("spark.ui.enabled", "false"))) + .set("spark.ui.enabled", "false") + .set("spark.unsafe.exceptionOnMemoryLeak", "true"))) case class TestHiveVersion(hiveClient: HiveClient) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org