aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPunya Biswal <pbiswal@palantir.com>2015-06-17 15:29:39 -0700
committerMichael Armbrust <michael@databricks.com>2015-06-17 15:29:39 -0700
commitd1069cba4a2eb4f00fc3306993a49284efad00c7 (patch)
tree3aae340a6628c200ed57d766c08f8d7d381db909
parenta06d9c8e76bb904d48764802aa3affff93b00baa (diff)
downloadspark-d1069cba4a2eb4f00fc3306993a49284efad00c7.tar.gz
spark-d1069cba4a2eb4f00fc3306993a49284efad00c7.tar.bz2
spark-d1069cba4a2eb4f00fc3306993a49284efad00c7.zip
[SPARK-8397] [SQL] Allow custom configuration for TestHive
We encourage people to use TestHive in unit tests, because it's impossible to create more than one HiveContext within one process. The current implementation locks people into using a local[2] SparkContext underlying their HiveContext. We should make it possible to override this using a system property so that people can test against local-cluster or remote spark clusters to make their tests more realistic. Author: Punya Biswal <pbiswal@palantir.com> Closes #6844 from punya/feature/SPARK-8397 and squashes the following commits: 97ef394 [Punya Biswal] [SPARK-8397][SQL] Allow custom configuration for TestHive
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala2
1 files changed, 1 insertions, 1 deletions
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 7c7afc824d..9215509620 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
@@ -49,7 +49,7 @@ import scala.collection.JavaConversions._
object TestHive
extends TestHiveContext(
new SparkContext(
- "local[2]",
+ System.getProperty("spark.sql.test.master", "local[2]"),
"TestSQLContext",
new SparkConf()
.set("spark.sql.test", "")