Repository: spark
Updated Branches:
  refs/heads/branch-1.6 8cfe8b881 -> 696fc33b8


[SPARK-9866][SQL] Speed up VersionsSuite by using persistent Ivy cache

This patch attempts to speed up VersionsSuite by storing fetched Hive JARs in 
an Ivy cache that persists across tests runs. If 
`SPARK_VERSIONS_SUITE_IVY_PATH` is set, that path will be used for the cache; 
if it is not set, VersionsSuite will create a temporary Ivy cache which is 
deleted after the test completes.

Author: Josh Rosen <[email protected]>

Closes #9624 from JoshRosen/SPARK-9866.

(cherry picked from commit 9db5f601facfdaba6e4333a6b2d2e4a9f009c788)
Signed-off-by: Josh Rosen <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/696fc33b
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/696fc33b
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/696fc33b

Branch: refs/heads/branch-1.6
Commit: 696fc33b83d22c3e101804a023380cd2377ab36b
Parents: 8cfe8b8
Author: Josh Rosen <[email protected]>
Authored: Mon Nov 23 16:33:26 2015 -0800
Committer: Josh Rosen <[email protected]>
Committed: Mon Nov 23 16:33:37 2015 -0800

----------------------------------------------------------------------
 .../org/apache/spark/sql/hive/client/VersionsSuite.scala  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/696fc33b/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala
----------------------------------------------------------------------
diff --git 
a/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala 
b/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala
index c6d034a..7bc13bc 100644
--- 
a/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala
+++ 
b/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/VersionsSuite.scala
@@ -36,10 +36,12 @@ import org.apache.spark.util.Utils
 @ExtendedHiveTest
 class VersionsSuite extends SparkFunSuite with Logging {
 
-  // Do not use a temp path here to speed up subsequent executions of the unit 
test during
-  // development.
-  private val ivyPath = Some(
-    new File(sys.props("java.io.tmpdir"), "hive-ivy-cache").getAbsolutePath())
+  // In order to speed up test execution during development or in Jenkins, you 
can specify the path
+  // of an existing Ivy cache:
+  private val ivyPath: Option[String] = {
+    sys.env.get("SPARK_VERSIONS_SUITE_IVY_PATH").orElse(
+      Some(new File(sys.props("java.io.tmpdir"), 
"hive-ivy-cache").getAbsolutePath))
+  }
 
   private def buildConf() = {
     lazy val warehousePath = Utils.createTempDir()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to