From f71e783b38cf709cb1bf6dcfea45237d820c7bd1 Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Sun, 14 Dec 2014 18:29:40 +0000 Subject: [PATCH 1/2] Enable assertions for SBT and Maven build --- pom.xml | 2 +- project/SparkBuild.scala | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f42257265ede..a8a7314b90af 100644 --- a/pom.xml +++ b/pom.xml @@ -958,7 +958,7 @@ ${project.build.directory}/surefire-reports . SparkTestSuite.txt - -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m + -ea -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m true diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 39ac27f820d8..3b2d8ba66d07 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -385,6 +385,7 @@ object TestSettings { javaOptions in Test += "-Dsun.io.serialization.extendedDebugInfo=true", javaOptions in Test ++= System.getProperties.filter(_._1 startsWith "spark") .map { case (k,v) => s"-D$k=$v" }.toSeq, + javaOptions in Test += "-ea", javaOptions in Test ++= "-Xmx3g -XX:PermSize=128M -XX:MaxNewSize=256m -XX:MaxPermSize=1g" .split(" ").toSeq, // This places test scope jars on the classpath of executors during tests. From caca7047a6bcd672ae5e9657f4b2d5a61ba97cb7 Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Sun, 14 Dec 2014 21:27:31 +0000 Subject: [PATCH 2/2] Disable assertions just for Hive --- project/SparkBuild.scala | 2 ++ sql/hive/pom.xml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 3b2d8ba66d07..ff8cf81b286a 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -256,6 +256,8 @@ object Hive { lazy val settings = Seq( javaOptions += "-XX:MaxPermSize=1g", + // Specially disable assertions since some Hive tests fail them + javaOptions in Test := (javaOptions in Test).value.filterNot(_ == "-ea"), // Multiple queries rely on the TestHive singleton. See comments there for more details. parallelExecution in Test := false, // Supporting all SerDes requires us to depend on deprecated APIs, so we turn off the warnings diff --git a/sql/hive/pom.xml b/sql/hive/pom.xml index f6805b942153..95db71c2fd95 100644 --- a/sql/hive/pom.xml +++ b/sql/hive/pom.xml @@ -161,6 +161,10 @@ org.scalatest scalatest-maven-plugin + + + -da -Xmx3g -XX:MaxPermSize=${MaxPermGen} -XX:ReservedCodeCacheSize=512m + org.codehaus.mojo