diff options
author | Marcelo Vanzin <vanzin@cloudera.com> | 2015-06-08 15:37:28 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2015-06-08 15:37:28 +0100 |
commit | a1d9e5cc60d317ecf8fe390b66b623ae39c4534d (patch) | |
tree | 1801288569cadc5f429fd33baf058b2504e11792 /pom.xml | |
parent | 03ef6be9ce61a13dcd9d8c71298fb4be39119411 (diff) | |
download | spark-a1d9e5cc60d317ecf8fe390b66b623ae39c4534d.tar.gz spark-a1d9e5cc60d317ecf8fe390b66b623ae39c4534d.tar.bz2 spark-a1d9e5cc60d317ecf8fe390b66b623ae39c4534d.zip |
[SPARK-8126] [BUILD] Use custom temp directory during build.
Even with all the efforts to cleanup the temp directories created by
unit tests, Spark leaves a lot of garbage in /tmp after a test run.
This change overrides java.io.tmpdir to place those files under the
build directory instead.
After an sbt full unit test run, I was left with > 400 MB of temp
files. Since they're now under the build dir, it's much easier to
clean them up.
Also make a slight change to a unit test to make it not pollute the
source directory with test data.
Author: Marcelo Vanzin <vanzin@cloudera.com>
Closes #6674 from vanzin/SPARK-8126 and squashes the following commits:
0f8ad41 [Marcelo Vanzin] Make sure tmp dir exists when tests run.
643e916 [Marcelo Vanzin] [MINOR] [BUILD] Use custom temp directory during build.
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -179,7 +179,7 @@ <parquet.deps.scope>compile</parquet.deps.scope> <!-- - Overridable test home. So that you can call individual pom files directory without + Overridable test home. So that you can call individual pom files directly without things breaking. --> <spark.test.home>${session.executionRootDirectory}</spark.test.home> @@ -1256,6 +1256,7 @@ <systemProperties> <derby.system.durability>test</derby.system.durability> <java.awt.headless>true</java.awt.headless> + <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir> <spark.test.home>${spark.test.home}</spark.test.home> <spark.testing>1</spark.testing> <spark.ui.enabled>false</spark.ui.enabled> @@ -1289,6 +1290,7 @@ <systemProperties> <derby.system.durability>test</derby.system.durability> <java.awt.headless>true</java.awt.headless> + <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir> <spark.test.home>${spark.test.home}</spark.test.home> <spark.testing>1</spark.testing> <spark.ui.enabled>false</spark.ui.enabled> @@ -1548,6 +1550,26 @@ </execution> </executions> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>create-tmp-dir</id> + <phase>generate-test-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <mkdir dir="${project.build.directory}/tmp" /> + </target> + </configuration> + </execution> + </executions> + </plugin> + <!-- Enable surefire and scalatest in all children, in one place: --> <plugin> <groupId>org.apache.maven.plugins</groupId> |