You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crunch.apache.org by jw...@apache.org on 2012/09/09 03:57:11 UTC

git commit: CRUNCH-52: Explicitly reference the file that we want to read in with the output records.

Updated Branches:
  refs/heads/master 867314ef6 -> 67142f6b4


CRUNCH-52: Explicitly reference the file that we want to read in with the output records.


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

Branch: refs/heads/master
Commit: 67142f6b4fb8c258297ad2230090ea9d5c4f12c5
Parents: 867314e
Author: Josh Wills <jw...@apache.org>
Authored: Sat Sep 8 18:56:35 2012 -0700
Committer: Josh Wills <jw...@apache.org>
Committed: Sat Sep 8 18:56:35 2012 -0700

----------------------------------------------------------------------
 .../org/apache/crunch/io/avro/AvroPipelineIT.java  |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/67142f6b/crunch/src/it/java/org/apache/crunch/io/avro/AvroPipelineIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/io/avro/AvroPipelineIT.java b/crunch/src/it/java/org/apache/crunch/io/avro/AvroPipelineIT.java
index 22892ec..e0a7ead 100644
--- a/crunch/src/it/java/org/apache/crunch/io/avro/AvroPipelineIT.java
+++ b/crunch/src/it/java/org/apache/crunch/io/avro/AvroPipelineIT.java
@@ -90,12 +90,7 @@ public class AvroPipelineIT implements Serializable {
     pipeline.write(genericCollection, textFile);
     pipeline.run();
     Person person = genericCollection.materialize().iterator().next();
-    Collection<File> listFiles = FileUtils.listFiles(outputFile, null, false);
-    File partFile = null;
-    for (File foundfile : listFiles) {
-      partFile = foundfile;
-    }
-    String outputString = FileUtils.readFileToString(partFile);
+    String outputString = FileUtils.readFileToString(new File(outputFile, "part-m-00000"));
     assertTrue(outputString.contains(person.toString()));
   }
 }