hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r473439 - in /lucene/hadoop/trunk: CHANGES.txt src/test/org/apache/hadoop/mapred/TestTextInputFormat.java
Date Fri, 10 Nov 2006 19:25:13 GMT
Author: cutting
Date: Fri Nov 10 11:25:12 2006
New Revision: 473439

URL: http://svn.apache.org/viewvc?view=rev&rev=473439
Log:
HADOOP-696.  Fix TestTextInputFormat to not rely on the order of directory listings.  Contributed
by Sameer.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=473439&r1=473438&r2=473439
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Fri Nov 10 11:25:12 2006
@@ -38,6 +38,9 @@
     are not collected like normal buffers, and provided little
     advantage.  (Raghu Angadi via cutting)
 
+12. HADOOP-696.  Fix TestTextInputFormat unit test to not rely on the
+    order of directory listings.  (Sameer Paranjpye via cutting)
+
 
 Release 0.8.0 - 2006-11-03
 

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java?view=diff&rev=473439&r1=473438&r2=473439
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/mapred/TestTextInputFormat.java Fri Nov
10 11:25:12 2006
@@ -215,6 +215,11 @@
     format.configure(job);
     FileSplit[] splits = format.getSplits(localFs, job, 100);
     assertEquals("compressed splits == 2", 2, splits.length);
+    if (splits[0].getPath().getName().equals("part2.txt.gz")) {
+      FileSplit tmp = splits[0];
+      splits[0] = splits[1];
+      splits[1] = tmp;
+    }
     List<Text> results = readSplit(format, splits[0], job);
     assertEquals("splits[0] length", 6, results.size());
     assertEquals("splits[0][5]", " dog", results.get(5).toString());



Mime
View raw message