Skip to content
Snippets Groups Projects
Commit 9db5f601 authored by Josh Rosen's avatar Josh Rosen
Browse files

[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 <joshrosen@databricks.com>

Closes #9624 from JoshRosen/SPARK-9866.
parent c2467dad
No related branches found
No related tags found
No related merge requests found
...@@ -36,10 +36,12 @@ import org.apache.spark.util.Utils ...@@ -36,10 +36,12 @@ import org.apache.spark.util.Utils
@ExtendedHiveTest @ExtendedHiveTest
class VersionsSuite extends SparkFunSuite with Logging { class VersionsSuite extends SparkFunSuite with Logging {
// Do not use a temp path here to speed up subsequent executions of the unit test during // In order to speed up test execution during development or in Jenkins, you can specify the path
// development. // of an existing Ivy cache:
private val ivyPath = Some( private val ivyPath: Option[String] = {
new File(sys.props("java.io.tmpdir"), "hive-ivy-cache").getAbsolutePath()) sys.env.get("SPARK_VERSIONS_SUITE_IVY_PATH").orElse(
Some(new File(sys.props("java.io.tmpdir"), "hive-ivy-cache").getAbsolutePath))
}
private def buildConf() = { private def buildConf() = {
lazy val warehousePath = Utils.createTempDir() lazy val warehousePath = Utils.createTempDir()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment