hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r559112 - in /lucene/hadoop/branches/branch-0.14: CHANGES.txt src/test/org/apache/hadoop/dfs/TestDecommission.java
Date Tue, 24 Jul 2007 17:10:52 GMT
Author: cutting
Date: Tue Jul 24 10:10:51 2007
New Revision: 559112

URL: http://svn.apache.org/viewvc?view=rev&rev=559112
Log:
Merge -r 559067:559068 from trunk to 0.14 branch.  Fixes: HADOOP-1640.

Modified:
    lucene/hadoop/branches/branch-0.14/CHANGES.txt
    lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDecommission.java

Modified: lucene/hadoop/branches/branch-0.14/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/CHANGES.txt?view=diff&rev=559112&r1=559111&r2=559112
==============================================================================
--- lucene/hadoop/branches/branch-0.14/CHANGES.txt (original)
+++ lucene/hadoop/branches/branch-0.14/CHANGES.txt Tue Jul 24 10:10:51 2007
@@ -404,6 +404,9 @@
 135. HADOOP-1619.  Fix FSInputChecker to not attempt to read past EOF.
      (Hairong Kuang via cutting)
 
+136. HADOOP-1640.  Fix TestDecommission on Windows.
+     (Dhruba Borthakur via cutting)
+
 
 Release 0.13.0 - 2007-06-08
 

Modified: lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDecommission.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDecommission.java?view=diff&rev=559112&r1=559111&r2=559112
==============================================================================
--- lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDecommission.java
(original)
+++ lucene/hadoop/branches/branch-0.14/src/test/org/apache/hadoop/dfs/TestDecommission.java
Tue Jul 24 10:10:51 2007
@@ -24,6 +24,7 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.net.*;
+import java.lang.InterruptedException;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileSystem;
@@ -83,10 +84,19 @@
   
   private void checkFile(FileSystem fileSys, Path name, int repl)
     throws IOException {
-    String[][] locations = fileSys.getFileCacheHints(name, 0, fileSize);
-    for (int idx = 0; idx < locations.length; idx++) {
-      assertEquals("Number of replicas for block" + idx,
-                   Math.min(numDatanodes, repl), locations[idx].length);  
+    boolean done = false;
+    while (!done) {
+      try {
+        Thread.sleep(1000);
+      } catch (InterruptedException e) {}
+      done = true;
+      String[][] locations = fileSys.getFileCacheHints(name, 0, fileSize);
+      for (int idx = 0; idx < locations.length; idx++) {
+        if (locations[idx].length < repl) {
+          done = false;
+          break;
+        }
+      }
     }
   }
 



Mime
View raw message