aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2015-07-08 20:29:08 -0700
committerReynold Xin <rxin@databricks.com>2015-07-08 20:29:08 -0700
commit47ef423f860c3109d50c7e321616b267f4296e34 (patch)
tree0df3b3f7a91b2e9137dfc657c598ee2b2f001b25
parentb55499a44ab74e33378211fb0d6940905d7c6318 (diff)
downloadspark-47ef423f860c3109d50c7e321616b267f4296e34.tar.gz
spark-47ef423f860c3109d50c7e321616b267f4296e34.tar.bz2
spark-47ef423f860c3109d50c7e321616b267f4296e34.zip
[SPARK-8910] Fix MiMa flaky due to port contention issue
Due to the way MiMa works, we currently start a `SQLContext` pretty early on. This causes us to start a `SparkUI` that attempts to bind to port 4040. Because many tests run in parallel on the Jenkins machines, this causes port contention sometimes and fails the MiMa tests. Note that we already disabled the SparkUI for scalatests. However, the MiMa test is run before we even have a chance to load the default scalatest settings, so we need to explicitly disable the UI ourselves. Author: Andrew Or <andrew@databricks.com> Closes #7300 from andrewor14/mima-flaky and squashes the following commits: b55a547 [Andrew Or] Do not enable SparkUI during tests
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/test/TestSQLContext.scala8
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala7
2 files changed, 8 insertions, 7 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/test/TestSQLContext.scala b/sql/core/src/main/scala/org/apache/spark/sql/test/TestSQLContext.scala
index 9fa394525d..b3a4231da9 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/test/TestSQLContext.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/test/TestSQLContext.scala
@@ -26,10 +26,10 @@ import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
/** A SQLContext that can be used for local testing. */
class LocalSQLContext
extends SQLContext(
- new SparkContext(
- "local[2]",
- "TestSQLContext",
- new SparkConf().set("spark.sql.testkey", "true"))) {
+ new SparkContext("local[2]", "TestSQLContext", new SparkConf()
+ .set("spark.sql.testkey", "true")
+ // SPARK-8910
+ .set("spark.ui.enabled", "false"))) {
override protected[sql] def createSession(): SQLSession = {
new this.SQLSession()
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 7978fdacae..0f217bc668 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
@@ -53,9 +53,10 @@ object TestHive
"TestSQLContext",
new SparkConf()
.set("spark.sql.test", "")
- .set(
- "spark.sql.hive.metastore.barrierPrefixes",
- "org.apache.spark.sql.hive.execution.PairSerDe")))
+ .set("spark.sql.hive.metastore.barrierPrefixes",
+ "org.apache.spark.sql.hive.execution.PairSerDe")
+ // SPARK-8910
+ .set("spark.ui.enabled", "false")))
/**
* A locally running test instance of Spark's Hive execution engine.