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/12/10 16:42:22 UTC

git commit: Use a smaller and simpler input for the NLineInputIT

Updated Branches:
  refs/heads/master 77e691932 -> bf5cea2fe


Use a smaller and simpler input for the NLineInputIT


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

Branch: refs/heads/master
Commit: bf5cea2fe24150fc3f8b2ad3c65de7ee732a4631
Parents: 77e6919
Author: Josh Wills <jw...@apache.org>
Authored: Sun Dec 9 23:35:30 2012 -0800
Committer: Josh Wills <jw...@apache.org>
Committed: Sun Dec 9 23:35:30 2012 -0800

----------------------------------------------------------------------
 .../it/java/org/apache/crunch/io/NLineInputIT.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-crunch/blob/bf5cea2f/crunch/src/it/java/org/apache/crunch/io/NLineInputIT.java
----------------------------------------------------------------------
diff --git a/crunch/src/it/java/org/apache/crunch/io/NLineInputIT.java b/crunch/src/it/java/org/apache/crunch/io/NLineInputIT.java
index 3b7abf6..6b16aa8 100644
--- a/crunch/src/it/java/org/apache/crunch/io/NLineInputIT.java
+++ b/crunch/src/it/java/org/apache/crunch/io/NLineInputIT.java
@@ -39,12 +39,12 @@ public class NLineInputIT {
   
   @Test
   public void testNLine() throws Exception {
-    String shakesInputPath = tmpDir.copyResourceFileName("shakes.txt");
+    String urlsInputPath = tmpDir.copyResourceFileName("urls.txt");
     Pipeline pipeline = new MRPipeline(NLineInputIT.class, tmpDir.getDefaultConfiguration());
-    PCollection<String> shakespeare = pipeline.read(new NLineFileSource<String>(shakesInputPath,
-        Writables.strings(), 100));
-    assertEquals(new Integer(100),
-        shakespeare.parallelDo(new LineCountFn(), Avros.ints()).max().getValue());
+    PCollection<String> urls = pipeline.read(new NLineFileSource<String>(urlsInputPath,
+        Writables.strings(), 2));
+    assertEquals(new Integer(2),
+        urls.parallelDo(new LineCountFn(), Avros.ints()).max().getValue());
   }
   
   private static class LineCountFn extends DoFn<String, Integer> {