aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-09-13 16:08:04 -0700
committerMichael Armbrust <michael@databricks.com>2014-09-13 16:08:04 -0700
commit0f8c4edf4e750e3d11da27cc22c40b0489da7f37 (patch)
tree7370c6c3634d0e76b74cc3443779bfea6c98f106 /sql/hive
parent74049249abb952ad061c0e221c22ff894a9e9c8d (diff)
downloadspark-0f8c4edf4e750e3d11da27cc22c40b0489da7f37.tar.gz
spark-0f8c4edf4e750e3d11da27cc22c40b0489da7f37.tar.bz2
spark-0f8c4edf4e750e3d11da27cc22c40b0489da7f37.zip
[SQL] Decrease partitions when testing
Author: Michael Armbrust <michael@databricks.com> Closes #2164 from marmbrus/shufflePartitions and squashes the following commits: 0da1e8c [Michael Armbrust] test hax ef2d985 [Michael Armbrust] more test hacks. 2dabae3 [Michael Armbrust] more test fixes 0bdbf21 [Michael Armbrust] Make parquet tests less order dependent b42eeab [Michael Armbrust] increase test parallelism 80453d5 [Michael Armbrust] Decrease partitions when testing
Diffstat (limited to 'sql/hive')
-rw-r--r--sql/hive/src/main/scala/org/apache/spark/sql/hive/TestHive.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/TestHive.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/TestHive.scala
index a3bfd3a8f1..70fb15259e 100644
--- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/TestHive.scala
+++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/TestHive.scala
@@ -35,12 +35,13 @@ import org.apache.spark.sql.catalyst.analysis._
import org.apache.spark.sql.catalyst.plans.logical.{CacheCommand, LogicalPlan, NativeCommand}
import org.apache.spark.sql.catalyst.util._
import org.apache.spark.sql.hive._
+import org.apache.spark.sql.SQLConf
/* Implicit conversions */
import scala.collection.JavaConversions._
object TestHive
- extends TestHiveContext(new SparkContext("local", "TestSQLContext", new SparkConf()))
+ extends TestHiveContext(new SparkContext("local[2]", "TestSQLContext", new SparkConf()))
/**
* A locally running test instance of Spark's Hive execution engine.
@@ -90,6 +91,10 @@ class TestHiveContext(sc: SparkContext) extends HiveContext(sc) {
override def executePlan(plan: LogicalPlan): this.QueryExecution =
new this.QueryExecution { val logical = plan }
+ /** Fewer partitions to speed up testing. */
+ override private[spark] def numShufflePartitions: Int =
+ getConf(SQLConf.SHUFFLE_PARTITIONS, "5").toInt
+
/**
* Returns the value of specified environmental variable as a [[java.io.File]] after checking
* to ensure it exists