incubator-crunch-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwi...@apache.org
Subject [3/7] git commit: CRUNCH-26: Create crunch-test Maven module.
Date Sat, 28 Jul 2012 19:40:20 GMT
CRUNCH-26: Create crunch-test Maven module.

Create crunch-test Maven module for test utils and library dependencies.
Depend on crunch-test from crunch-core and scrunch.
Refactor TemporaryPath to no longer depend on crunch-core.
Use the new TemporaryPath.getDefaultConfiguration() everywhere.

Signed-off-by: jwills <jwills@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-crunch/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crunch/commit/9c42c0b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crunch/tree/9c42c0b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crunch/diff/9c42c0b3

Branch: refs/heads/master
Commit: 9c42c0b35c0976b6c72a59c37788ad5032601595
Parents: b4ef5ff
Author: Matthias Friedrich <matt@mafr.de>
Authored: Sat Jul 28 14:19:58 2012 +0200
Committer: jwills <jwills@apache.org>
Committed: Sat Jul 28 11:17:59 2012 -0700

----------------------------------------------------------------------
 crunch-test/pom.xml                                |  120 +++++++++++++
 .../org/apache/crunch/test/TemporaryPathIT.java    |   84 +++++++++
 crunch-test/src/it/resources/data.txt              |    1 +
 .../java/org/apache/crunch/test/FileHelper.java    |   42 +++++
 .../java/org/apache/crunch/test/TemporaryPath.java |  136 +++++++++++++++
 .../java/org/apache/crunch/test/package-info.java  |    4 +
 crunch/pom.xml                                     |   33 +----
 .../it/java/org/apache/crunch/CollectionsIT.java   |   11 +-
 crunch/src/it/java/org/apache/crunch/MapsIT.java   |    7 +-
 .../it/java/org/apache/crunch/MaterializeIT.java   |   17 +-
 .../java/org/apache/crunch/MaterializeToMapIT.java |    9 +-
 .../java/org/apache/crunch/MultipleOutputIT.java   |    8 +-
 .../org/apache/crunch/PCollectionGetSizeIT.java    |   19 ++-
 .../java/org/apache/crunch/PTableKeyValueIT.java   |    9 +-
 .../src/it/java/org/apache/crunch/PageRankIT.java  |   10 +-
 .../it/java/org/apache/crunch/TermFrequencyIT.java |    8 +-
 .../src/it/java/org/apache/crunch/TextPairIT.java  |    9 +-
 crunch/src/it/java/org/apache/crunch/TfIdfIT.java  |    8 +-
 .../org/apache/crunch/TupleNClassCastBugIT.java    |    8 +-
 .../java/org/apache/crunch/WordCountHBaseIT.java   |    3 +-
 .../src/it/java/org/apache/crunch/WordCountIT.java |   16 +-
 .../crunch/impl/mem/MemPipelineFileWritingIT.java  |    3 +-
 .../crunch/impl/mr/collect/UnionCollectionIT.java  |    8 +-
 .../apache/crunch/io/CompositePathIterableIT.java  |    6 +-
 .../crunch/io/avro/AvroFileSourceTargetIT.java     |   10 +-
 .../org/apache/crunch/io/avro/AvroReflectIT.java   |    9 +-
 .../it/java/org/apache/crunch/lib/AggregateIT.java |   25 ++--
 .../java/org/apache/crunch/lib/AvroTypeSortIT.java |    6 +-
 .../it/java/org/apache/crunch/lib/CogroupIT.java   |    8 +-
 .../src/it/java/org/apache/crunch/lib/SetIT.java   |   11 +-
 .../src/it/java/org/apache/crunch/lib/SortIT.java  |   44 +++---
 .../apache/crunch/lib/SpecificAvroGroupByIT.java   |    8 +-
 .../org/apache/crunch/lib/join/JoinTester.java     |   13 +-
 .../org/apache/crunch/lib/join/MapsideJoinIT.java  |    8 +-
 .../crunch/lib/join/MultiAvroSchemaJoinIT.java     |    6 +-
 .../java/org/apache/crunch/test/TemporaryPath.java |  113 ------------
 .../org/apache/crunch/test/TemporaryPathIT.java    |   59 -------
 .../org/apache/crunch/test/TemporaryPaths.java     |   23 +++
 .../java/org/apache/crunch/test/FileHelper.java    |   42 -----
 pom.xml                                            |    5 +-
 scrunch/pom.xml                                    |    8 +-
 .../scala/org/apache/scrunch/PipelineAppTest.scala |    2 +-
 42 files changed, 567 insertions(+), 412 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch-test/pom.xml
----------------------------------------------------------------------
diff --git a/crunch-test/pom.xml b/crunch-test/pom.xml
new file mode 100644
index 0000000..45384bc
--- /dev/null
+++ b/crunch-test/pom.xml
@@ -0,0 +1,120 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.crunch</groupId>
+    <artifactId>crunch-parent</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>crunch-test</artifactId>
+  <name>Crunch Test</name>
+  <description>
+    Provides test dependencies and utilities.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>hadoop-client</artifactId>
+    </dependency>
+
+    <dependency>
+     <groupId>org.apache.hadoop</groupId>
+     <artifactId>hadoop-minicluster</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.hamcrest</groupId>
+      <artifactId>hamcrest-all</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <!-- Same integration test setup as in crunch-core -->
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>add-test-source</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>add-test-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${basedir}/src/it/java</source>
+              </sources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>add-test-resource</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>add-test-resource</goal>
+            </goals>
+            <configuration>
+              <resources>
+                  <resource>
+                    <directory>${basedir}/src/it/resources</directory>
+                  </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <configuration>
+          <testSourceDirectory>${basedir}/src/it/java</testSourceDirectory>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch-test/src/it/java/org/apache/crunch/test/TemporaryPathIT.java
----------------------------------------------------------------------
diff --git a/crunch-test/src/it/java/org/apache/crunch/test/TemporaryPathIT.java b/crunch-test/src/it/java/org/apache/crunch/test/TemporaryPathIT.java
new file mode 100644
index 0000000..a03c332
--- /dev/null
+++ b/crunch-test/src/it/java/org/apache/crunch/test/TemporaryPathIT.java
@@ -0,0 +1,84 @@
+package org.apache.crunch.test;
+
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.startsWith;
+import static org.junit.Assert.assertThat;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.LocalFileSystem;
+import org.junit.Rule;
+import org.junit.Test;
+
+
+public class TemporaryPathIT {
+  @Rule
+  public TemporaryPath tmpDir = new TemporaryPath("foo.tmp", "bar.tmp");
+
+  @Test
+  public void testRoot() throws IOException {
+    assertThat(tmpDir.getRootFile().exists(), is(true));
+    assertThat(new File(tmpDir.getRootFileName()).exists(), is(true));
+    assertThat(getFs().exists(tmpDir.getRootPath()), is(true));
+  }
+
+  @Test
+  public void testFile() throws IOException {
+    assertThat(tmpDir.getFile("foo").getParentFile(), is(tmpDir.getRootFile()));
+    assertThat(tmpDir.getFile("foo").getName(), is("foo"));
+    assertThat(tmpDir.getFile("foo").exists(), is(false));
+  }
+
+  @Test
+  public void testPath() throws IOException {
+    assertThat(tmpDir.getPath("foo").getParent(), is(tmpDir.getRootPath()));
+    assertThat(tmpDir.getPath("foo").getName(), is("foo"));
+    assertThat(getFs().exists(tmpDir.getPath("foo")), is(false));
+  }
+
+  @Test
+  public void testFileName() {
+    assertThat(new File(tmpDir.getRootFileName()), is(tmpDir.getRootFile()));
+    assertThat(new File(tmpDir.getFileName("foo").toString()), is(tmpDir.getFile("foo")));
+  }
+
+  @Test
+  public void testCopyResource() throws IOException {
+    File dest = tmpDir.getFile("data.txt");
+    assertThat(dest.exists(), is(false));
+
+    tmpDir.copyResourceFile("data.txt");
+    assertThat(dest.exists(), is(true));
+  }
+
+  @Test
+  public void testGetDefaultConfiguration() {
+    Configuration conf = tmpDir.getDefaultConfiguration();
+    String fooDir = conf.get("foo.tmp");
+    String barDir = conf.get("bar.tmp");
+
+    assertThat(fooDir, startsWith(tmpDir.getRootFileName()));
+    assertThat(barDir, startsWith(tmpDir.getRootFileName()));
+    assertThat(fooDir, is(not(barDir)));
+  }
+
+  @Test
+  public void testOverridePathProperties() {
+    Configuration conf = new Configuration();
+    conf.set("foo.tmp", "whatever");
+    conf.set("other.dir", "/my/dir");
+
+    tmpDir.overridePathProperties(conf);
+
+    assertThat(conf.get("foo.tmp"), startsWith(tmpDir.getRootFileName()));
+    assertThat(conf.get("other.dir"), is("/my/dir"));
+  }
+
+  private LocalFileSystem getFs() throws IOException {
+    return FileSystem.getLocal(new Configuration());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch-test/src/it/resources/data.txt
----------------------------------------------------------------------
diff --git a/crunch-test/src/it/resources/data.txt b/crunch-test/src/it/resources/data.txt
new file mode 100644
index 0000000..b10a89e
--- /dev/null
+++ b/crunch-test/src/it/resources/data.txt
@@ -0,0 +1 @@
+Just some test data.

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch-test/src/main/java/org/apache/crunch/test/FileHelper.java
----------------------------------------------------------------------
diff --git a/crunch-test/src/main/java/org/apache/crunch/test/FileHelper.java b/crunch-test/src/main/java/org/apache/crunch/test/FileHelper.java
new file mode 100644
index 0000000..ca5a4b3
--- /dev/null
+++ b/crunch-test/src/main/java/org/apache/crunch/test/FileHelper.java
@@ -0,0 +1,42 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.crunch.test;
+
+import static com.google.common.io.Resources.getResource;
+import static com.google.common.io.Resources.newInputStreamSupplier;
+
+import java.io.File;
+import java.io.IOException;
+
+import com.google.common.io.Files;
+
+public class FileHelper {
+
+  public static String createTempCopyOf(String fileResource) throws IOException {
+    File tmpFile = File.createTempFile("tmp", "");
+    tmpFile.deleteOnExit();
+    Files.copy(newInputStreamSupplier(getResource(fileResource)), tmpFile);
+    return tmpFile.getAbsolutePath();
+  }
+
+  public static File createOutputPath() throws IOException {
+    File output = File.createTempFile("output", "");
+    output.delete();
+    return output;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch-test/src/main/java/org/apache/crunch/test/TemporaryPath.java
----------------------------------------------------------------------
diff --git a/crunch-test/src/main/java/org/apache/crunch/test/TemporaryPath.java b/crunch-test/src/main/java/org/apache/crunch/test/TemporaryPath.java
new file mode 100644
index 0000000..d981211
--- /dev/null
+++ b/crunch-test/src/main/java/org/apache/crunch/test/TemporaryPath.java
@@ -0,0 +1,136 @@
+package org.apache.crunch.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Set;
+
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.thirdparty.guava.common.collect.ImmutableSet;
+import org.junit.rules.ExternalResource;
+import org.junit.rules.TemporaryFolder;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import com.google.common.io.Files;
+import com.google.common.io.Resources;
+
+/**
+ * Creates a temporary directory for a test case and destroys it afterwards.
+ *
+ * This provides a temporary directory like JUnit's {@link TemporaryFolder} but
+ * geared towards Hadoop applications. Unlike {@link TemporaryFolder}, it
+ * doesn't create any files or directories except for the root directory itself.
+ *
+ * Also, {@link #getDefaultConfiguration()} provides you with a configuration that
+ * overrides path properties with temporary directories. You have to specify these
+ * properties via the constructor.
+ */
+public final class TemporaryPath extends ExternalResource {
+  private final TemporaryFolder tmp = new TemporaryFolder();
+  private final Set<String> confKeys;
+
+  /**
+   * Construct {@link TemporaryPath}.
+   * @param confKeys {@link Configuration} keys containing directories to override
+   */
+  public TemporaryPath(String... confKeys) {
+    if (confKeys != null) {
+      this.confKeys = ImmutableSet.copyOf(confKeys);
+    } else {
+      this.confKeys = ImmutableSet.of();
+    }
+  }
+
+  @Override
+  public Statement apply(Statement base, Description description) {
+    return tmp.apply(base, description);
+  }
+
+  /**
+   * Get the root directory which will be deleted automatically.
+   */
+  public File getRootFile() {
+    return tmp.getRoot();
+  }
+
+  /**
+   * Get the root directory as a {@link Path}.
+   */
+  public Path getRootPath() {
+    return toPath(tmp.getRoot());
+  }
+
+  /**
+   * Get the root directory as an absolute file name.
+   */
+  public String getRootFileName() {
+    return tmp.getRoot().getAbsolutePath();
+  }
+
+  /**
+   * Get a {@link File} below the temporary directory.
+   */
+  public File getFile(String fileName) {
+    return new File(getRootFile(), fileName);
+  }
+
+  /**
+   * Get a {@link Path} below the temporary directory.
+   */
+  public Path getPath(String fileName) {
+    return toPath(getFile(fileName));
+  }
+
+  /**
+   * Get an absolute file name below the temporary directory.
+   */
+  public String getFileName(String fileName) {
+    return getFile(fileName).getAbsolutePath();
+  }
+
+  /**
+   * Copy a classpath resource to {@link File}.
+   */
+  public File copyResourceFile(String resourceName) throws IOException {
+    File dest = new File(tmp.getRoot(), resourceName);
+    copy(resourceName, dest);
+    return dest;
+  }
+
+  /**
+   * Copy a classpath resource to a {@link Path}.
+   */
+  public Path copyResourcePath(String resourceName) throws IOException {
+    return toPath(copyResourceFile(resourceName));
+  }
+
+  /**
+   * Copy a classpath resource returning its absolute file name.
+   */
+  public String copyResourceFileName(String resourceName) throws IOException {
+    return copyResourceFile(resourceName).getAbsolutePath();
+  }
+
+  private void copy(String resourceName, File dest) throws IOException {
+    Files.copy(Resources.newInputStreamSupplier(Resources.getResource(resourceName)), dest);
+  }
+
+  private static Path toPath(File file) {
+    return new Path(file.getAbsolutePath());
+  }
+
+  public Configuration getDefaultConfiguration() {
+    return overridePathProperties(new Configuration());
+  }
+
+  /**
+   * Set all keys specified in the constructor to temporary directories.
+   */
+  public Configuration overridePathProperties(Configuration config) {
+    for (String name : confKeys) {
+      config.set(name, getFileName("tmp-" + name));
+    }
+    return config;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch-test/src/main/java/org/apache/crunch/test/package-info.java
----------------------------------------------------------------------
diff --git a/crunch-test/src/main/java/org/apache/crunch/test/package-info.java b/crunch-test/src/main/java/org/apache/crunch/test/package-info.java
new file mode 100644
index 0000000..2113dfb
--- /dev/null
+++ b/crunch-test/src/main/java/org/apache/crunch/test/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Provides a collection of test utilities.
+ */
+package org.apache.crunch.test;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/pom.xml
----------------------------------------------------------------------
diff --git a/crunch/pom.xml b/crunch/pom.xml
index a440f2c..d3af75e 100644
--- a/crunch/pom.xml
+++ b/crunch/pom.xml
@@ -90,30 +90,12 @@ under the License.
     </dependency>
 
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
+      <groupId>org.apache.crunch</groupId>
+      <artifactId>crunch-test</artifactId>
       <scope>test</scope>
     </dependency>
            
     <dependency>
-     <groupId>org.apache.hadoop</groupId>
-     <artifactId>hadoop-minicluster</artifactId>
-     <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.hamcrest</groupId>
-      <artifactId>hamcrest-all</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
       <groupId>commons-logging</groupId>
       <artifactId>commons-logging</artifactId>
     </dependency>
@@ -211,17 +193,6 @@ under the License.
           </execution>
         </executions>
       </plugin>
-     <plugin>
-       <groupId>org.apache.maven.plugins</groupId>
-       <artifactId>maven-jar-plugin</artifactId>
-       <executions>
-         <execution>
-           <goals>
-             <goal>test-jar</goal>
-           </goals>
-         </execution>
-       </executions>
-     </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/CollectionsIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/CollectionsIT.java b/crunch/src/it/java/org/apache/crunch/CollectionsIT.java
index c9ff2a9..3f372be 100644
--- a/crunch/src/it/java/org/apache/crunch/CollectionsIT.java
+++ b/crunch/src/it/java/org/apache/crunch/CollectionsIT.java
@@ -24,12 +24,11 @@ import java.util.Collection;
 
 import org.apache.crunch.impl.mem.MemPipeline;
 import org.apache.crunch.impl.mr.MRPipeline;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -76,16 +75,16 @@ public class CollectionsIT {
   }
 
   @Rule
-  public TemporaryPath temporaryPath= new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testWritables() throws IOException {
-    run(new MRPipeline(CollectionsIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(CollectionsIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testAvro() throws IOException {
-    run(new MRPipeline(CollectionsIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance());
+    run(new MRPipeline(CollectionsIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance());
   }
 
   @Test
@@ -99,7 +98,7 @@ public class CollectionsIT {
   }
 
   public void run(Pipeline pipeline, PTypeFamily typeFamily) throws IOException {
-    String shakesInputPath = FileHelper.createTempCopyOf("shakes.txt");
+    String shakesInputPath = tmpDir.copyResourceFileName("shakes.txt");
 
     PCollection<String> shakespeare = pipeline.readTextFile(shakesInputPath);
     Iterable<Pair<String, Collection<String>>> lines = listOfCharcters(shakespeare, typeFamily).materialize();

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/MapsIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/MapsIT.java b/crunch/src/it/java/org/apache/crunch/MapsIT.java
index 3b9fb37..320aba6 100644
--- a/crunch/src/it/java/org/apache/crunch/MapsIT.java
+++ b/crunch/src/it/java/org/apache/crunch/MapsIT.java
@@ -17,15 +17,14 @@
  */
 package org.apache.crunch;
 
-import java.io.Serializable;
 import java.util.Map;
 
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -34,7 +33,7 @@ import com.google.common.collect.Maps;
 
 public class MapsIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testWritables() throws Exception {
@@ -47,7 +46,7 @@ public class MapsIT {
   }
 
   public static void run(PTypeFamily typeFamily, TemporaryPath tmpDir) throws Exception {
-    Pipeline pipeline = new MRPipeline(MapsIT.class, tmpDir.setTempLoc(new Configuration()));
+    Pipeline pipeline = new MRPipeline(MapsIT.class, tmpDir.getDefaultConfiguration());
     String shakesInputPath = tmpDir.copyResourceFileName("shakes.txt");
     PCollection<String> shakespeare = pipeline.readTextFile(shakesInputPath);
     Iterable<Pair<String, Map<String, Long>>> output = shakespeare

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/MaterializeIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/MaterializeIT.java b/crunch/src/it/java/org/apache/crunch/MaterializeIT.java
index 2e12578..f309462 100644
--- a/crunch/src/it/java/org/apache/crunch/MaterializeIT.java
+++ b/crunch/src/it/java/org/apache/crunch/MaterializeIT.java
@@ -25,12 +25,11 @@ import java.util.List;
 
 import org.apache.crunch.impl.mem.MemPipeline;
 import org.apache.crunch.impl.mr.MRPipeline;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -49,17 +48,17 @@ public class MaterializeIT {
   }
 
   @Rule
-  public TemporaryPath temporaryPath= new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testMaterializeInput_Writables() throws IOException {
-    runMaterializeInput(new MRPipeline(MaterializeIT.class, temporaryPath.setTempLoc(new Configuration())),
+    runMaterializeInput(new MRPipeline(MaterializeIT.class, tmpDir.getDefaultConfiguration()),
         WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testMaterializeInput_Avro() throws IOException {
-    runMaterializeInput(new MRPipeline(MaterializeIT.class, temporaryPath.setTempLoc(new Configuration())),
+    runMaterializeInput(new MRPipeline(MaterializeIT.class, tmpDir.getDefaultConfiguration()),
         AvroTypeFamily.getInstance());
   }
 
@@ -75,13 +74,13 @@ public class MaterializeIT {
 
   @Test
   public void testMaterializeEmptyIntermediate_Writables() throws IOException {
-    runMaterializeEmptyIntermediate(new MRPipeline(MaterializeIT.class, temporaryPath.setTempLoc(new Configuration())),
+    runMaterializeEmptyIntermediate(new MRPipeline(MaterializeIT.class, tmpDir.getDefaultConfiguration()),
         WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testMaterializeEmptyIntermediate_Avro() throws IOException {
-    runMaterializeEmptyIntermediate(new MRPipeline(MaterializeIT.class, temporaryPath.setTempLoc(new Configuration())),
+    runMaterializeEmptyIntermediate(new MRPipeline(MaterializeIT.class, tmpDir.getDefaultConfiguration()),
         AvroTypeFamily.getInstance());
   }
 
@@ -97,7 +96,7 @@ public class MaterializeIT {
 
   public void runMaterializeInput(Pipeline pipeline, PTypeFamily typeFamily) throws IOException {
     List<String> expectedContent = Lists.newArrayList("b", "c", "a", "e");
-    String inputPath = FileHelper.createTempCopyOf("set1.txt");
+    String inputPath = tmpDir.copyResourceFileName("set1.txt");
 
     PCollection<String> lines = pipeline.readTextFile(inputPath);
     assertEquals(expectedContent, Lists.newArrayList(lines.materialize()));
@@ -105,7 +104,7 @@ public class MaterializeIT {
   }
 
   public void runMaterializeEmptyIntermediate(Pipeline pipeline, PTypeFamily typeFamily) throws IOException {
-    String inputPath = FileHelper.createTempCopyOf("set1.txt");
+    String inputPath = tmpDir.copyResourceFileName("set1.txt");
     PCollection<String> empty = pipeline.readTextFile(inputPath).filter(new FalseFilterFn());
 
     assertTrue(Lists.newArrayList(empty.materialize()).isEmpty());

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/MaterializeToMapIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/MaterializeToMapIT.java b/crunch/src/it/java/org/apache/crunch/MaterializeToMapIT.java
index 8177c1c..f038306 100644
--- a/crunch/src/it/java/org/apache/crunch/MaterializeToMapIT.java
+++ b/crunch/src/it/java/org/apache/crunch/MaterializeToMapIT.java
@@ -24,10 +24,9 @@ import java.util.Map;
 
 import org.apache.crunch.impl.mem.MemPipeline;
 import org.apache.crunch.impl.mr.MRPipeline;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -67,12 +66,12 @@ public class MaterializeToMapIT {
     }
   }
   @Rule
-  public TemporaryPath temporaryPath= new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testMRMaterializeToMap() throws IOException {
-    Pipeline p = new MRPipeline(MaterializeToMapIT.class, temporaryPath.setTempLoc(new Configuration()));
-    String inputFile = FileHelper.createTempCopyOf("set1.txt");
+    Pipeline p = new MRPipeline(MaterializeToMapIT.class, tmpDir.getDefaultConfiguration());
+    String inputFile = tmpDir.copyResourceFileName("set1.txt");
     PCollection<String> c = p.readTextFile(inputFile);
     PTypeFamily tf = c.getTypeFamily();
     PTable<Integer, String> t = c.parallelDo(new Set1Mapper(), tf.tableOf(tf.ints(), tf.strings()));

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/MultipleOutputIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/MultipleOutputIT.java b/crunch/src/it/java/org/apache/crunch/MultipleOutputIT.java
index a523505..d8b5722 100644
--- a/crunch/src/it/java/org/apache/crunch/MultipleOutputIT.java
+++ b/crunch/src/it/java/org/apache/crunch/MultipleOutputIT.java
@@ -28,10 +28,10 @@ import java.util.List;
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.At;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -39,7 +39,7 @@ import com.google.common.io.Files;
 
 public class MultipleOutputIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   public static PCollection<String> evenCountLetters(PCollection<String> words, PTypeFamily typeFamily) {
     return words.parallelDo("even", new FilterFn<String>() {
@@ -74,12 +74,12 @@ public class MultipleOutputIT {
 
   @Test
   public void testWritables() throws IOException {
-    run(new MRPipeline(MultipleOutputIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(MultipleOutputIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testAvro() throws IOException {
-    run(new MRPipeline(MultipleOutputIT.class, tmpDir.setTempLoc(new Configuration())), AvroTypeFamily.getInstance());
+    run(new MRPipeline(MultipleOutputIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance());
   }
 
   public void run(Pipeline pipeline, PTypeFamily typeFamily) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/PCollectionGetSizeIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/PCollectionGetSizeIT.java b/crunch/src/it/java/org/apache/crunch/PCollectionGetSizeIT.java
index 6168967..8182b30 100644
--- a/crunch/src/it/java/org/apache/crunch/PCollectionGetSizeIT.java
+++ b/crunch/src/it/java/org/apache/crunch/PCollectionGetSizeIT.java
@@ -29,7 +29,7 @@ import java.io.IOException;
 import org.apache.crunch.impl.mem.MemPipeline;
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.test.TemporaryPath;
-import org.apache.hadoop.conf.Configuration;
+import org.apache.crunch.test.TemporaryPaths;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Rule;
@@ -37,7 +37,7 @@ import org.junit.Test;
 
 public class PCollectionGetSizeIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   private String emptyInputPath;
   private String nonEmptyInputPath;
@@ -62,7 +62,7 @@ public class PCollectionGetSizeIT {
 
   @Test
   public void testGetSizeOfEmptyInput_MRPipeline() throws IOException {
-    testCollectionGetSizeOfEmptyInput(new MRPipeline(this.getClass(), tmpDir.setTempLoc(new Configuration())));
+    testCollectionGetSizeOfEmptyInput(new MRPipeline(this.getClass(), tmpDir.getDefaultConfiguration()));
   }
 
   @Test
@@ -77,7 +77,7 @@ public class PCollectionGetSizeIT {
 
   @Test
   public void testMaterializeEmptyInput_MRPipeline() throws IOException {
-    testMaterializeEmptyInput(new MRPipeline(this.getClass(), tmpDir.setTempLoc(new Configuration())));
+    testMaterializeEmptyInput(new MRPipeline(this.getClass(), tmpDir.getDefaultConfiguration()));
   }
 
   @Test
@@ -92,7 +92,8 @@ public class PCollectionGetSizeIT {
   @Test
   public void testGetSizeOfEmptyIntermediatePCollection_MRPipeline() throws IOException {
 
-    PCollection<String> emptyIntermediate = createPesistentEmptyIntermediate(new MRPipeline(this.getClass(), tmpDir.setTempLoc(new Configuration())));
+    PCollection<String> emptyIntermediate = createPesistentEmptyIntermediate(
+        new MRPipeline(this.getClass(), tmpDir.getDefaultConfiguration()));
 
     assertThat(emptyIntermediate.getSize(), is(0L));
   }
@@ -101,7 +102,8 @@ public class PCollectionGetSizeIT {
   @Ignore("GetSize of a DoCollection is only an estimate based on scale factor, so we can't count on it being reported as 0")
   public void testGetSizeOfEmptyIntermediatePCollection_NoSave_MRPipeline() throws IOException {
 
-    PCollection<String> data = new MRPipeline(this.getClass(), tmpDir.setTempLoc(new Configuration())).readTextFile(nonEmptyInputPath);
+    PCollection<String> data = new MRPipeline(this.getClass(), tmpDir.getDefaultConfiguration())
+      .readTextFile(nonEmptyInputPath);
 
     PCollection<String> emptyPCollection = data.filter(new FalseFilterFn());
 
@@ -119,7 +121,8 @@ public class PCollectionGetSizeIT {
   @Test
   public void testMaterializeOfEmptyIntermediatePCollection_MRPipeline() throws IOException {
 
-    PCollection<String> emptyIntermediate = createPesistentEmptyIntermediate(new MRPipeline(this.getClass(), tmpDir.setTempLoc(new Configuration())));
+    PCollection<String> emptyIntermediate = createPesistentEmptyIntermediate(
+        new MRPipeline(this.getClass(), tmpDir.getDefaultConfiguration()));
 
     assertThat(newArrayList(emptyIntermediate.materialize()).size(), is(0));
   }
@@ -147,7 +150,7 @@ public class PCollectionGetSizeIT {
 
   @Test(expected = IllegalStateException.class)
   public void testExpectExceptionForGettingSizeOfNonExistingFile_MRPipeline() throws IOException {
-    new MRPipeline(this.getClass(), tmpDir.setTempLoc(new Configuration())).readTextFile("non_existing.file").getSize();
+    new MRPipeline(this.getClass(), tmpDir.getDefaultConfiguration()).readTextFile("non_existing.file").getSize();
   }
 
   @Test(expected = IllegalStateException.class)

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/PTableKeyValueIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/PTableKeyValueIT.java b/crunch/src/it/java/org/apache/crunch/PTableKeyValueIT.java
index 94d2792..d56e122 100644
--- a/crunch/src/it/java/org/apache/crunch/PTableKeyValueIT.java
+++ b/crunch/src/it/java/org/apache/crunch/PTableKeyValueIT.java
@@ -27,12 +27,11 @@ import junit.framework.Assert;
 
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.At;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -52,12 +51,12 @@ public class PTableKeyValueIT implements Serializable {
   private transient MRPipeline pipeline;
   private transient String inputFile;
   @Rule
-  public transient TemporaryPath temporaryPath = new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Before
   public void setUp() throws IOException {
-    pipeline = new MRPipeline(PTableKeyValueIT.class, temporaryPath.setTempLoc(new Configuration()));
-    inputFile = FileHelper.createTempCopyOf("set1.txt");
+    pipeline = new MRPipeline(PTableKeyValueIT.class, tmpDir.getDefaultConfiguration());
+    inputFile = tmpDir.copyResourceFileName("set1.txt");
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/PageRankIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/PageRankIT.java b/crunch/src/it/java/org/apache/crunch/PageRankIT.java
index 7791936..fc0640a 100644
--- a/crunch/src/it/java/org/apache/crunch/PageRankIT.java
+++ b/crunch/src/it/java/org/apache/crunch/PageRankIT.java
@@ -27,13 +27,13 @@ import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.lib.Aggregate;
 import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PType;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.avro.Avros;
 import org.apache.crunch.types.writable.WritableTypeFamily;
 import org.apache.crunch.util.PTypes;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -71,13 +71,13 @@ public class PageRankIT {
   }
 
   @Rule
-  public TemporaryPath temporaryPath = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testAvroReflect() throws Exception {
     PTypeFamily tf = AvroTypeFamily.getInstance();
     PType<PageRankData> prType = Avros.reflects(PageRankData.class);
-    run(new MRPipeline(PageRankIT.class, temporaryPath.setTempLoc(new Configuration())), prType, tf);
+    run(new MRPipeline(PageRankIT.class, tmpDir.getDefaultConfiguration()), prType, tf);
   }
 
   @Test
@@ -91,14 +91,14 @@ public class PageRankIT {
   public void testAvroJSON() throws Exception {
     PTypeFamily tf = AvroTypeFamily.getInstance();
     PType<PageRankData> prType = PTypes.jsonString(PageRankData.class, tf);
-    run(new MRPipeline(PageRankIT.class, temporaryPath.setTempLoc(new Configuration())), prType, tf);
+    run(new MRPipeline(PageRankIT.class, tmpDir.getDefaultConfiguration()), prType, tf);
   }
 
   @Test
   public void testWritablesJSON() throws Exception {
     PTypeFamily tf = WritableTypeFamily.getInstance();
     PType<PageRankData> prType = PTypes.jsonString(PageRankData.class, tf);
-    run(new MRPipeline(PageRankIT.class, temporaryPath.setTempLoc(new Configuration())), prType, tf);
+    run(new MRPipeline(PageRankIT.class, tmpDir.getDefaultConfiguration()), prType, tf);
   }
 
   public static PTable<String, PageRankData> pageRank(PTable<String, PageRankData> input, final float d) {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/TermFrequencyIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/TermFrequencyIT.java b/crunch/src/it/java/org/apache/crunch/TermFrequencyIT.java
index 8e52d03..ca66aa8 100644
--- a/crunch/src/it/java/org/apache/crunch/TermFrequencyIT.java
+++ b/crunch/src/it/java/org/apache/crunch/TermFrequencyIT.java
@@ -30,25 +30,25 @@ import org.apache.crunch.io.At;
 import org.apache.crunch.io.ReadableSourceTarget;
 import org.apache.crunch.lib.Aggregate;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
 @SuppressWarnings("serial")
 public class TermFrequencyIT implements Serializable {
   @Rule
-  public transient TemporaryPath tmpDir = new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testTermFrequencyWithNoTransform() throws IOException {
-    run(new MRPipeline(TermFrequencyIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), false);
+    run(new MRPipeline(TermFrequencyIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), false);
   }
 
   @Test
   public void testTermFrequencyWithTransform() throws IOException {
-    run(new MRPipeline(TermFrequencyIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), true);
+    run(new MRPipeline(TermFrequencyIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), true);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/TextPairIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/TextPairIT.java b/crunch/src/it/java/org/apache/crunch/TextPairIT.java
index 3b3a239..55d9af9 100644
--- a/crunch/src/it/java/org/apache/crunch/TextPairIT.java
+++ b/crunch/src/it/java/org/apache/crunch/TextPairIT.java
@@ -23,20 +23,19 @@ import java.io.IOException;
 
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.From;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.writable.Writables;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
 public class TextPairIT {
   @Rule
-  public TemporaryPath temporaryPath= new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testWritables() throws IOException {
-    run(new MRPipeline(TextPairIT.class, temporaryPath.setTempLoc(new Configuration())));
+    run(new MRPipeline(TextPairIT.class, tmpDir.getDefaultConfiguration()));
   }
 
   private static final String CANARY = "Writables.STRING_TO_TEXT";
@@ -55,7 +54,7 @@ public class TextPairIT {
   }
 
   public void run(Pipeline pipeline) throws IOException {
-    String input = FileHelper.createTempCopyOf("shakes.txt");
+    String input = tmpDir.copyResourceFileName("shakes.txt");
 
     PCollection<String> shakespeare = pipeline.read(From.textFile(input));
     Iterable<Pair<String, String>> lines = pipeline.materialize(wordDuplicate(shakespeare));

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/TfIdfIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/TfIdfIT.java b/crunch/src/it/java/org/apache/crunch/TfIdfIT.java
index 411985c..0c39c4b 100644
--- a/crunch/src/it/java/org/apache/crunch/TfIdfIT.java
+++ b/crunch/src/it/java/org/apache/crunch/TfIdfIT.java
@@ -32,9 +32,9 @@ import org.apache.crunch.io.seq.SeqFileSourceTarget;
 import org.apache.crunch.lib.Aggregate;
 import org.apache.crunch.lib.Join;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.junit.Rule;
 import org.junit.Test;
@@ -45,19 +45,19 @@ import com.google.common.io.Files;
 @SuppressWarnings("serial")
 public class TfIdfIT implements Serializable {
   @Rule
-  public transient TemporaryPath tmpDir = new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   // total number of documents, should calculate
   protected static final double N = 2;
 
   @Test
   public void testWritablesSingleRun() throws IOException {
-    run(new MRPipeline(TfIdfIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), true);
+    run(new MRPipeline(TfIdfIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), true);
   }
 
   @Test
   public void testWritablesMultiRun() throws IOException {
-    run(new MRPipeline(TfIdfIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), false);
+    run(new MRPipeline(TfIdfIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), false);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/TupleNClassCastBugIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/TupleNClassCastBugIT.java b/crunch/src/it/java/org/apache/crunch/TupleNClassCastBugIT.java
index 48a8ef6..e49f4d5 100644
--- a/crunch/src/it/java/org/apache/crunch/TupleNClassCastBugIT.java
+++ b/crunch/src/it/java/org/apache/crunch/TupleNClassCastBugIT.java
@@ -26,10 +26,10 @@ import java.util.List;
 
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -38,7 +38,7 @@ import com.google.common.io.Files;
 
 public class TupleNClassCastBugIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   public static PCollection<TupleN> mapGroupDo(PCollection<String> lines, PTypeFamily ptf) {
     PTable<String, TupleN> mapped = lines.parallelDo(new MapFn<String, Pair<String, TupleN>>() {
@@ -63,12 +63,12 @@ public class TupleNClassCastBugIT {
 
   @Test
   public void testWritables() throws IOException {
-    run(new MRPipeline(TupleNClassCastBugIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(TupleNClassCastBugIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testAvro() throws IOException {
-    run(new MRPipeline(TupleNClassCastBugIT.class, tmpDir.setTempLoc(new Configuration())), AvroTypeFamily.getInstance());
+    run(new MRPipeline(TupleNClassCastBugIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance());
   }
 
   public void run(Pipeline pipeline, PTypeFamily typeFamily) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/WordCountHBaseIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/WordCountHBaseIT.java b/crunch/src/it/java/org/apache/crunch/WordCountHBaseIT.java
index 9d42ee0..f7c9836 100644
--- a/crunch/src/it/java/org/apache/crunch/WordCountHBaseIT.java
+++ b/crunch/src/it/java/org/apache/crunch/WordCountHBaseIT.java
@@ -33,6 +33,7 @@ import org.apache.crunch.io.hbase.HBaseSourceTarget;
 import org.apache.crunch.io.hbase.HBaseTarget;
 import org.apache.crunch.lib.Aggregate;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.writable.Writables;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.filecache.DistributedCache;
@@ -58,7 +59,7 @@ import com.google.common.io.ByteStreams;
 
 public class WordCountHBaseIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   private static final byte[] COUNTS_COLFAM = Bytes.toBytes("cf");
   private static final byte[] WORD_COLFAM = Bytes.toBytes("cf");

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/WordCountIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/WordCountIT.java b/crunch/src/it/java/org/apache/crunch/WordCountIT.java
index fe0c98d..5124663 100644
--- a/crunch/src/it/java/org/apache/crunch/WordCountIT.java
+++ b/crunch/src/it/java/org/apache/crunch/WordCountIT.java
@@ -30,10 +30,10 @@ import org.apache.crunch.io.At;
 import org.apache.crunch.io.To;
 import org.apache.crunch.lib.Aggregate;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -43,7 +43,7 @@ import com.google.common.io.Files;
 
 public class WordCountIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   enum WordCountStats {
     ANDS
@@ -80,31 +80,31 @@ public class WordCountIT {
 
   @Test
   public void testWritables() throws IOException {
-    run(new MRPipeline(WordCountIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(WordCountIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testWritablesWithSecond() throws IOException {
     runSecond = true;
-    run(new MRPipeline(WordCountIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(WordCountIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testWritablesWithSecondUseToOutput() throws IOException {
     runSecond = true;
     useToOutput = true;
-    run(new MRPipeline(WordCountIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(WordCountIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testAvro() throws IOException {
-    run(new MRPipeline(WordCountIT.class, tmpDir.setTempLoc(new Configuration())), AvroTypeFamily.getInstance());
+    run(new MRPipeline(WordCountIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance());
   }
 
   @Test
   public void testAvroWithSecond() throws IOException {
     runSecond = true;
-    run(new MRPipeline(WordCountIT.class, tmpDir.setTempLoc(new Configuration())), AvroTypeFamily.getInstance());
+    run(new MRPipeline(WordCountIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance());
   }
 
   @Test
@@ -118,7 +118,7 @@ public class WordCountIT {
   }
 
   public void runWithTop(PTypeFamily tf) throws IOException {
-    Pipeline pipeline = new MRPipeline(WordCountIT.class, tmpDir.setTempLoc(new Configuration()));
+    Pipeline pipeline = new MRPipeline(WordCountIT.class, tmpDir.getDefaultConfiguration());
     String inputPath = tmpDir.copyResourceFileName("shakes.txt");
 
     PCollection<String> shakespeare = pipeline.read(At.textFile(inputPath, tf.strings()));

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/impl/mem/MemPipelineFileWritingIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/impl/mem/MemPipelineFileWritingIT.java b/crunch/src/it/java/org/apache/crunch/impl/mem/MemPipelineFileWritingIT.java
index db0e8ce..dc9652d 100644
--- a/crunch/src/it/java/org/apache/crunch/impl/mem/MemPipelineFileWritingIT.java
+++ b/crunch/src/it/java/org/apache/crunch/impl/mem/MemPipelineFileWritingIT.java
@@ -26,6 +26,7 @@ import java.util.List;
 import org.apache.crunch.PCollection;
 import org.apache.crunch.Pipeline;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -35,7 +36,7 @@ import com.google.common.io.Files;
 
 public class MemPipelineFileWritingIT {
   @Rule
-  public TemporaryPath baseTmpDir = new TemporaryPath();
+  public TemporaryPath baseTmpDir = TemporaryPaths.create();
 
   @Test
   public void testMemPipelineFileWriter() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/impl/mr/collect/UnionCollectionIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/impl/mr/collect/UnionCollectionIT.java b/crunch/src/it/java/org/apache/crunch/impl/mr/collect/UnionCollectionIT.java
index 56dc10d..6e70ff6 100644
--- a/crunch/src/it/java/org/apache/crunch/impl/mr/collect/UnionCollectionIT.java
+++ b/crunch/src/it/java/org/apache/crunch/impl/mr/collect/UnionCollectionIT.java
@@ -19,7 +19,6 @@ package org.apache.crunch.impl.mr.collect;
 
 import static org.junit.Assert.assertEquals;
 
-import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -37,12 +36,11 @@ import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.At;
 import org.apache.crunch.io.To;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.avro.Avros;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -55,7 +53,7 @@ import com.google.common.collect.Lists;
 @RunWith(value = Parameterized.class)
 public class UnionCollectionIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   private static final Log LOG = LogFactory.getLog(UnionCollectionIT.class);
 
@@ -75,7 +73,7 @@ public class UnionCollectionIT {
     if (pipelineClass == null) {
       pipeline = MemPipeline.getInstance();
     } else {
-      pipeline = new MRPipeline(pipelineClass, tmpDir.setTempLoc(new Configuration()));
+      pipeline = new MRPipeline(pipelineClass, tmpDir.getDefaultConfiguration());
     }
     PCollection<String> firstCollection = pipeline.read(At.textFile(inputFile1, typeFamily.strings()));
     PCollection<String> secondCollection = pipeline.read(At.textFile(inputFile2, typeFamily.strings()));

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/io/CompositePathIterableIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/io/CompositePathIterableIT.java b/crunch/src/it/java/org/apache/crunch/io/CompositePathIterableIT.java
index c55287c..796b821 100644
--- a/crunch/src/it/java/org/apache/crunch/io/CompositePathIterableIT.java
+++ b/crunch/src/it/java/org/apache/crunch/io/CompositePathIterableIT.java
@@ -25,8 +25,8 @@ import java.io.File;
 import java.io.IOException;
 
 import org.apache.crunch.io.text.TextFileReaderFactory;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.writable.Writables;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
@@ -39,11 +39,11 @@ import com.google.common.collect.Lists;
 
 public class CompositePathIterableIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testCreate_FilePresent() throws IOException {
-    String inputFilePath = FileHelper.createTempCopyOf("set1.txt");
+    String inputFilePath = tmpDir.copyResourceFileName("set1.txt");
     Configuration conf = new Configuration();
     LocalFileSystem local = FileSystem.getLocal(conf);
 

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/io/avro/AvroFileSourceTargetIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/io/avro/AvroFileSourceTargetIT.java b/crunch/src/it/java/org/apache/crunch/io/avro/AvroFileSourceTargetIT.java
index f82cf44..2e5a3bf 100644
--- a/crunch/src/it/java/org/apache/crunch/io/avro/AvroFileSourceTargetIT.java
+++ b/crunch/src/it/java/org/apache/crunch/io/avro/AvroFileSourceTargetIT.java
@@ -39,8 +39,8 @@ import org.apache.crunch.io.At;
 import org.apache.crunch.io.avro.AvroFileReaderFactoryTest.PojoPerson;
 import org.apache.crunch.test.Person;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.avro.Avros;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -53,7 +53,7 @@ public class AvroFileSourceTargetIT implements Serializable {
 
   private transient File avroFile;
   @Rule
-  public transient TemporaryPath temporaryPath= new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Before
   public void setUp() throws IOException {
@@ -89,7 +89,7 @@ public class AvroFileSourceTargetIT implements Serializable {
     savedRecord.put("siblingnames", Lists.newArrayList("Jimmy", "Jane"));
     populateGenericFile(Lists.newArrayList(savedRecord), Person.SCHEMA$);
 
-    Pipeline pipeline = new MRPipeline(AvroFileSourceTargetIT.class, temporaryPath.setTempLoc(new Configuration()));
+    Pipeline pipeline = new MRPipeline(AvroFileSourceTargetIT.class, tmpDir.getDefaultConfiguration());
     PCollection<Person> genericCollection = pipeline.read(At.avroFile(avroFile.getAbsolutePath(),
         Avros.records(Person.class)));
 
@@ -117,7 +117,7 @@ public class AvroFileSourceTargetIT implements Serializable {
     savedRecord.put("siblingnames", Lists.newArrayList("Jimmy", "Jane"));
     populateGenericFile(Lists.newArrayList(savedRecord), genericPersonSchema);
 
-    Pipeline pipeline = new MRPipeline(AvroFileSourceTargetIT.class, temporaryPath.setTempLoc(new Configuration()));
+    Pipeline pipeline = new MRPipeline(AvroFileSourceTargetIT.class, tmpDir.getDefaultConfiguration());
     PCollection<Record> genericCollection = pipeline.read(At.avroFile(avroFile.getAbsolutePath(),
         Avros.generics(genericPersonSchema)));
 
@@ -133,7 +133,7 @@ public class AvroFileSourceTargetIT implements Serializable {
     savedRecord.put("name", "John Doe");
     populateGenericFile(Lists.newArrayList(savedRecord), pojoPersonSchema);
 
-    Pipeline pipeline = new MRPipeline(AvroFileSourceTargetIT.class, temporaryPath.setTempLoc(new Configuration()));
+    Pipeline pipeline = new MRPipeline(AvroFileSourceTargetIT.class, tmpDir.getDefaultConfiguration());
     PCollection<PojoPerson> personCollection = pipeline.read(At.avroFile(avroFile.getAbsolutePath(),
         Avros.reflects(PojoPerson.class)));
 

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/io/avro/AvroReflectIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/io/avro/AvroReflectIT.java b/crunch/src/it/java/org/apache/crunch/io/avro/AvroReflectIT.java
index 94c4223..7c93756 100644
--- a/crunch/src/it/java/org/apache/crunch/io/avro/AvroReflectIT.java
+++ b/crunch/src/it/java/org/apache/crunch/io/avro/AvroReflectIT.java
@@ -27,10 +27,9 @@ import org.apache.crunch.MapFn;
 import org.apache.crunch.PCollection;
 import org.apache.crunch.Pipeline;
 import org.apache.crunch.impl.mr.MRPipeline;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.avro.Avros;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -89,12 +88,12 @@ public class AvroReflectIT implements Serializable {
 
   }
   @Rule
-  public transient TemporaryPath temporaryPath= new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testReflection() throws IOException {
-    Pipeline pipeline = new MRPipeline(AvroReflectIT.class, temporaryPath.setTempLoc(new Configuration()));
-    PCollection<StringWrapper> stringWrapperCollection = pipeline.readTextFile(FileHelper.createTempCopyOf("set1.txt"))
+    Pipeline pipeline = new MRPipeline(AvroReflectIT.class, tmpDir.getDefaultConfiguration());
+    PCollection<StringWrapper> stringWrapperCollection = pipeline.readTextFile(tmpDir.copyResourceFileName("set1.txt"))
         .parallelDo(new MapFn<String, StringWrapper>() {
 
           @Override

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/AggregateIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/AggregateIT.java b/crunch/src/it/java/org/apache/crunch/lib/AggregateIT.java
index 380df33..0202d09 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/AggregateIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/AggregateIT.java
@@ -34,15 +34,14 @@ import org.apache.crunch.Pipeline;
 import org.apache.crunch.impl.mem.MemPipeline;
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.test.Employee;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTableType;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.avro.Avros;
 import org.apache.crunch.types.writable.WritableTypeFamily;
 import org.apache.crunch.types.writable.Writables;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.Text;
 import org.junit.Rule;
 import org.junit.Test;
@@ -53,12 +52,12 @@ import com.google.common.collect.Lists;
 
 public class AggregateIT {
   @Rule
-  public TemporaryPath temporaryPath= new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testWritables() throws Exception {
-    Pipeline pipeline = new MRPipeline(AggregateIT.class, temporaryPath.setTempLoc(new Configuration()));
-    String shakesInputPath = FileHelper.createTempCopyOf("shakes.txt");
+    Pipeline pipeline = new MRPipeline(AggregateIT.class, tmpDir.getDefaultConfiguration());
+    String shakesInputPath = tmpDir.copyResourceFileName("shakes.txt");
     PCollection<String> shakes = pipeline.readTextFile(shakesInputPath);
     runMinMax(shakes, WritableTypeFamily.getInstance());
     pipeline.done();
@@ -66,8 +65,8 @@ public class AggregateIT {
 
   @Test
   public void testAvro() throws Exception {
-    Pipeline pipeline = new MRPipeline(AggregateIT.class, temporaryPath.setTempLoc(new Configuration()));
-    String shakesInputPath = FileHelper.createTempCopyOf("shakes.txt");
+    Pipeline pipeline = new MRPipeline(AggregateIT.class, tmpDir.getDefaultConfiguration());
+    String shakesInputPath = tmpDir.copyResourceFileName("shakes.txt");
     PCollection<String> shakes = pipeline.readTextFile(shakesInputPath);
     runMinMax(shakes, AvroTypeFamily.getInstance());
     pipeline.done();
@@ -109,8 +108,8 @@ public class AggregateIT {
 
   @Test
   public void testCollectUrls() throws Exception {
-    Pipeline p = new MRPipeline(AggregateIT.class, temporaryPath.setTempLoc(new Configuration()));
-    String urlsInputPath = FileHelper.createTempCopyOf("urls.txt");
+    Pipeline p = new MRPipeline(AggregateIT.class, tmpDir.getDefaultConfiguration());
+    String urlsInputPath = tmpDir.copyResourceFileName("urls.txt");
     PTable<String, Collection<String>> urls = Aggregate.collectValues(p.readTextFile(urlsInputPath).parallelDo(
         new SplitFn(), tableOf(strings(), strings())));
     for (Pair<String, Collection<String>> e : urls.materialize()) {
@@ -142,8 +141,8 @@ public class AggregateIT {
 
   @Test
   public void testCollectValues_Writables() throws IOException {
-    Pipeline pipeline = new MRPipeline(AggregateIT.class, temporaryPath.setTempLoc(new Configuration()));
-    Map<Integer, Collection<Text>> collectionMap = pipeline.readTextFile(FileHelper.createTempCopyOf("set2.txt"))
+    Pipeline pipeline = new MRPipeline(AggregateIT.class, tmpDir.getDefaultConfiguration());
+    Map<Integer, Collection<Text>> collectionMap = pipeline.readTextFile(tmpDir.copyResourceFileName("set2.txt"))
         .parallelDo(new MapStringToTextPair(), Writables.tableOf(Writables.ints(), Writables.writables(Text.class)))
         .collectValues().materializeToMap();
 
@@ -156,8 +155,8 @@ public class AggregateIT {
   public void testCollectValues_Avro() throws IOException {
 
     MapStringToEmployeePair mapFn = new MapStringToEmployeePair();
-    Pipeline pipeline = new MRPipeline(AggregateIT.class, temporaryPath.setTempLoc(new Configuration()));
-    Map<Integer, Collection<Employee>> collectionMap = pipeline.readTextFile(FileHelper.createTempCopyOf("set2.txt"))
+    Pipeline pipeline = new MRPipeline(AggregateIT.class, tmpDir.getDefaultConfiguration());
+    Map<Integer, Collection<Employee>> collectionMap = pipeline.readTextFile(tmpDir.copyResourceFileName("set2.txt"))
         .parallelDo(mapFn, Avros.tableOf(Avros.ints(), Avros.records(Employee.class))).collectValues()
         .materializeToMap();
 

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/AvroTypeSortIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/AvroTypeSortIT.java b/crunch/src/it/java/org/apache/crunch/lib/AvroTypeSortIT.java
index 8ee4af7..a7b8e9b 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/AvroTypeSortIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/AvroTypeSortIT.java
@@ -36,7 +36,7 @@ import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.At;
 import org.apache.crunch.test.Person;
 import org.apache.crunch.test.TemporaryPath;
-import org.apache.hadoop.conf.Configuration;
+import org.apache.crunch.test.TemporaryPaths;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -53,7 +53,7 @@ public class AvroTypeSortIT implements Serializable {
 
   private transient File avroFile;
   @Rule
-  public transient TemporaryPath temporaryPath= new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Before
   public void setUp() throws IOException {
@@ -68,7 +68,7 @@ public class AvroTypeSortIT implements Serializable {
   @Test
   public void testSortAvroTypesBySelectedFields() throws Exception {
 
-    MRPipeline pipeline = new MRPipeline(AvroTypeSortIT.class, temporaryPath.setTempLoc(new Configuration()));
+    MRPipeline pipeline = new MRPipeline(AvroTypeSortIT.class, tmpDir.getDefaultConfiguration());
 
     Person ccc10 = createPerson("CCC", 10);
     Person bbb20 = createPerson("BBB", 20);

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/CogroupIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/CogroupIT.java b/crunch/src/it/java/org/apache/crunch/lib/CogroupIT.java
index ae952d3..b6f5029 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/CogroupIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/CogroupIT.java
@@ -37,11 +37,11 @@ import org.apache.crunch.fn.MapValuesFn;
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.From;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTableType;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -50,7 +50,7 @@ import com.google.common.io.Files;
 
 public class CogroupIT {
   @Rule
-  public TemporaryPath tmpDir = new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   private static class WordSplit extends DoFn<String, Pair<String, Long>> {
     @Override
@@ -94,12 +94,12 @@ public class CogroupIT {
 
   @Test
   public void testWritableJoin() throws Exception {
-    run(new MRPipeline(CogroupIT.class, tmpDir.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(CogroupIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testAvroJoin() throws Exception {
-    run(new MRPipeline(CogroupIT.class, tmpDir.setTempLoc(new Configuration())), AvroTypeFamily.getInstance());
+    run(new MRPipeline(CogroupIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance());
   }
 
   public void run(Pipeline pipeline, PTypeFamily typeFamily) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/SetIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/SetIT.java b/crunch/src/it/java/org/apache/crunch/lib/SetIT.java
index bde3788..d1300d2 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/SetIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/SetIT.java
@@ -30,12 +30,11 @@ import org.apache.crunch.Pipeline;
 import org.apache.crunch.Tuple3;
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.io.At;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -60,7 +59,7 @@ public class SetIT {
   }
   
   @Rule
-  public TemporaryPath temporaryPath= new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Parameters
   public static Collection<Object[]> data() {
@@ -70,9 +69,9 @@ public class SetIT {
 
   @Before
   public void setUp() throws IOException {
-    String set1InputPath = FileHelper.createTempCopyOf("set1.txt");
-    String set2InputPath = FileHelper.createTempCopyOf("set2.txt");
-    pipeline = new MRPipeline(SetIT.class, temporaryPath.setTempLoc(new Configuration()));
+    String set1InputPath = tmpDir.copyResourceFileName("set1.txt");
+    String set2InputPath = tmpDir.copyResourceFileName("set2.txt");
+    pipeline = new MRPipeline(SetIT.class, tmpDir.getDefaultConfiguration());
     set1 = pipeline.read(At.textFile(set1InputPath, typeFamily.strings()));
     set2 = pipeline.read(At.textFile(set2InputPath, typeFamily.strings()));
   }

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/SortIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/SortIT.java b/crunch/src/it/java/org/apache/crunch/lib/SortIT.java
index 161adfc..dbc0c7e 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/SortIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/SortIT.java
@@ -44,12 +44,12 @@ import org.apache.crunch.lib.Sort.Order;
 import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.StringWrapper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PType;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.avro.Avros;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
@@ -58,100 +58,100 @@ import com.google.common.collect.Lists;
 
 public class SortIT implements Serializable {
   @Rule
-  public transient TemporaryPath temporaryPath= new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testWritableSortAsc() throws Exception {
-    runSingle(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), Order.ASCENDING,
+    runSingle(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), Order.ASCENDING,
         "A\tand this text as well");
   }
 
   @Test
   public void testWritableSortDesc() throws Exception {
-    runSingle(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), Order.DESCENDING,
+    runSingle(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), Order.DESCENDING,
         "B\tthis doc has some text");
   }
 
   @Test
   public void testWritableSortAscDesc() throws Exception {
-    runPair(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING), "A",
+    runPair(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING), "A",
         "this doc has this text");
   }
 
   @Test
   public void testWritableSortSecondDescFirstDesc() throws Exception {
-    runPair(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), by(2, DESCENDING), by(1, ASCENDING), "A",
+    runPair(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), by(2, DESCENDING), by(1, ASCENDING), "A",
         "this doc has this text");
   }
 
   @Test
   public void testWritableSortTripleAscDescAsc() throws Exception {
-    runTriple(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
+    runTriple(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
         by(3, ASCENDING), "A", "this", "doc");
   }
 
   @Test
   public void testWritableSortQuadAscDescAscDesc() throws Exception {
-    runQuad(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
+    runQuad(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
         by(3, ASCENDING), by(4, DESCENDING), "A", "this", "doc", "has");
   }
 
   @Test
   public void testWritableSortTupleNAscDesc() throws Exception {
-    runTupleN(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(),
+    runTupleN(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(),
         new ColumnOrder[] { by(1, ASCENDING), by(2, DESCENDING) }, new String[] { "A", "this doc has this text" });
   }
 
   @Test
   public void testWritableSortTable() throws Exception {
-    runTable(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance(), "A");
+    runTable(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance(), "A");
   }
 
   @Test
   public void testAvroSortAsc() throws Exception {
-    runSingle(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(), Order.ASCENDING, "A\tand this text as well");
+    runSingle(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(), Order.ASCENDING, "A\tand this text as well");
   }
 
   @Test
   public void testAvroSortDesc() throws Exception {
-    runSingle(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(), Order.DESCENDING, "B\tthis doc has some text");
+    runSingle(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(), Order.DESCENDING, "B\tthis doc has some text");
   }
 
   @Test
   public void testAvroSortPairAscAsc() throws Exception {
-    runPair(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING), "A",
+    runPair(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING), "A",
         "this doc has this text");
   }
 
   @Test
   @Ignore("Avro sorting only works in field order at the moment")
   public void testAvroSortPairSecondAscFirstDesc() throws Exception {
-    runPair(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(), by(2, DESCENDING), by(1, ASCENDING), "A",
+    runPair(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(), by(2, DESCENDING), by(1, ASCENDING), "A",
         "this doc has this text");
   }
 
   @Test
   public void testAvroSortTripleAscDescAsc() throws Exception {
-    runTriple(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
+    runTriple(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
         by(3, ASCENDING), "A", "this", "doc");
   }
 
   @Test
   public void testAvroSortQuadAscDescAscDesc() throws Exception {
-    runQuad(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
+    runQuad(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(), by(1, ASCENDING), by(2, DESCENDING),
         by(3, ASCENDING), by(4, DESCENDING), "A", "this", "doc", "has");
   }
 
   @Test
   public void testAvroSortTupleNAscDesc() throws Exception {
-    runTupleN(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(),
+    runTupleN(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(),
         new ColumnOrder[] { by(1, ASCENDING), by(2, DESCENDING) }, new String[] { "A", "this doc has this text" });
   }
 
   @Test
   public void testAvroReflectSortPair() throws IOException {
-    Pipeline pipeline = new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration()));
-    PCollection<Pair<String, StringWrapper>> sorted = pipeline.readTextFile(FileHelper.createTempCopyOf("set2.txt"))
+    Pipeline pipeline = new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration());
+    PCollection<Pair<String, StringWrapper>> sorted = pipeline.readTextFile(tmpDir.copyResourceFileName("set2.txt"))
         .parallelDo(new MapFn<String, Pair<String, StringWrapper>>() {
 
           @Override
@@ -170,8 +170,8 @@ public class SortIT implements Serializable {
 
   @Test
   public void testAvroReflectSortTable() throws IOException {
-    Pipeline pipeline = new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration()));
-    PTable<String, StringWrapper> unsorted = pipeline.readTextFile(FileHelper.createTempCopyOf("set2.txt")).parallelDo(
+    Pipeline pipeline = new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration());
+    PTable<String, StringWrapper> unsorted = pipeline.readTextFile(tmpDir.copyResourceFileName("set2.txt")).parallelDo(
         new MapFn<String, Pair<String, StringWrapper>>() {
 
           @Override
@@ -192,7 +192,7 @@ public class SortIT implements Serializable {
 
   @Test
   public void testAvroSortTable() throws Exception {
-    runTable(new MRPipeline(SortIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance(), "A");
+    runTable(new MRPipeline(SortIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance(), "A");
   }
 
   private void runSingle(Pipeline pipeline, PTypeFamily typeFamily, Order order, String firstLine) throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java b/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
index eda9c95..553ba7e 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/SpecificAvroGroupByIT.java
@@ -37,9 +37,9 @@ import org.apache.crunch.io.At;
 import org.apache.crunch.test.Person;
 import org.apache.crunch.test.Person.Builder;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.avro.Avros;
 import org.apache.crunch.types.avro.SafeAvroSerialization;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
@@ -56,7 +56,7 @@ public class SpecificAvroGroupByIT implements Serializable {
 
   private transient File avroFile;
   @Rule
-  public transient TemporaryPath temporaryPath= new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
 
   @Before
@@ -72,14 +72,14 @@ public class SpecificAvroGroupByIT implements Serializable {
   @Test
   public void testGrouByWithSpecificAvroType() throws Exception {
 
-    MRPipeline pipeline = new MRPipeline(SpecificAvroGroupByIT.class, temporaryPath.setTempLoc(new Configuration()));
+    MRPipeline pipeline = new MRPipeline(SpecificAvroGroupByIT.class, tmpDir.getDefaultConfiguration());
 
     testSpecificAvro(pipeline);
   }
 
   @Test
   public void testGrouByOnSpecificAvroButReflectionDatumReader() throws Exception {
-    MRPipeline pipeline = new MRPipeline(SpecificAvroGroupByIT.class, temporaryPath.setTempLoc(new Configuration()));
+    MRPipeline pipeline = new MRPipeline(SpecificAvroGroupByIT.class, tmpDir.getDefaultConfiguration());
 
     // https://issues.apache.org/jira/browse/AVRO-1046 resolves
     // the ClassCastException when reading specific Avro types with

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/join/JoinTester.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/join/JoinTester.java b/crunch/src/it/java/org/apache/crunch/lib/join/JoinTester.java
index b3db6d5..3e8ffda 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/join/JoinTester.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/join/JoinTester.java
@@ -29,13 +29,12 @@ import org.apache.crunch.Pipeline;
 import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.lib.Aggregate;
 import org.apache.crunch.lib.Join;
-import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.PTableType;
 import org.apache.crunch.types.PTypeFamily;
 import org.apache.crunch.types.avro.AvroTypeFamily;
 import org.apache.crunch.types.writable.WritableTypeFamily;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.Rule;
 import org.junit.Test;
 
@@ -69,8 +68,8 @@ public abstract class JoinTester implements Serializable {
   }
 
   protected void run(Pipeline pipeline, PTypeFamily typeFamily) throws IOException {
-    String shakesInputPath = FileHelper.createTempCopyOf("shakes.txt");
-    String maughamInputPath = FileHelper.createTempCopyOf("maugham.txt");
+    String shakesInputPath = tmpDir.copyResourceFileName("shakes.txt");
+    String maughamInputPath = tmpDir.copyResourceFileName("maugham.txt");
 
     PCollection<String> shakespeare = pipeline.readTextFile(shakesInputPath);
     PCollection<String> maugham = pipeline.readTextFile(maughamInputPath);
@@ -82,16 +81,16 @@ public abstract class JoinTester implements Serializable {
     pipeline.done();
   }
   @Rule
-  public transient TemporaryPath temporaryPath= new TemporaryPath();
+  public transient TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test
   public void testWritableJoin() throws Exception {
-    run(new MRPipeline(InnerJoinIT.class, temporaryPath.setTempLoc(new Configuration())), WritableTypeFamily.getInstance());
+    run(new MRPipeline(InnerJoinIT.class, tmpDir.getDefaultConfiguration()), WritableTypeFamily.getInstance());
   }
 
   @Test
   public void testAvroJoin() throws Exception {
-    run(new MRPipeline(InnerJoinIT.class, temporaryPath.setTempLoc(new Configuration())), AvroTypeFamily.getInstance());
+    run(new MRPipeline(InnerJoinIT.class, tmpDir.getDefaultConfiguration()), AvroTypeFamily.getInstance());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/9c42c0b3/crunch/src/it/java/org/apache/crunch/lib/join/MapsideJoinIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/lib/join/MapsideJoinIT.java b/crunch/src/it/java/org/apache/crunch/lib/join/MapsideJoinIT.java
index 77e753c..25472fb 100644
--- a/crunch/src/it/java/org/apache/crunch/lib/join/MapsideJoinIT.java
+++ b/crunch/src/it/java/org/apache/crunch/lib/join/MapsideJoinIT.java
@@ -34,8 +34,8 @@ import org.apache.crunch.impl.mr.MRPipeline;
 import org.apache.crunch.impl.mr.run.CrunchRuntimeException;
 import org.apache.crunch.test.FileHelper;
 import org.apache.crunch.test.TemporaryPath;
+import org.apache.crunch.test.TemporaryPaths;
 import org.apache.crunch.types.writable.Writables;
-import org.apache.hadoop.conf.Configuration;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Rule;
@@ -83,7 +83,7 @@ public class MapsideJoinIT {
 
   }
   @Rule
-  public TemporaryPath temporaryPath= new TemporaryPath();
+  public TemporaryPath tmpDir = TemporaryPaths.create();
 
   @Test(expected = CrunchRuntimeException.class)
   public void testNonMapReducePipeline() {
@@ -92,7 +92,7 @@ public class MapsideJoinIT {
 
   @Test
   public void testMapsideJoin_RightSideIsEmpty() throws IOException {
-    MRPipeline pipeline = new MRPipeline(MapsideJoinIT.class, temporaryPath.setTempLoc(new Configuration()));
+    MRPipeline pipeline = new MRPipeline(MapsideJoinIT.class, tmpDir.getDefaultConfiguration());
     PTable<Integer, String> customerTable = readTable(pipeline, "customers.txt");
     PTable<Integer, String> orderTable = readTable(pipeline, "orders.txt");
 
@@ -109,7 +109,7 @@ public class MapsideJoinIT {
 
   @Test
   public void testMapsideJoin() throws IOException {
-    runMapsideJoin(new MRPipeline(MapsideJoinIT.class, temporaryPath.setTempLoc(new Configuration())));
+    runMapsideJoin(new MRPipeline(MapsideJoinIT.class, tmpDir.getDefaultConfiguration()));
   }
 
   private void runMapsideJoin(Pipeline pipeline) {


Mime
View raw message