diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index fc9f484bd3..cf0fb480f4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -304,6 +304,9 @@ Release 2.0.1-alpha - UNRELEASED HDFS-3501. Checkpointing with security enabled will stop working after ticket lifetime expires. (atm via eli) + HDFS-3266. DFSTestUtil#waitCorruptReplicas doesn't sleep between checks. + (Madhukara Phatak via atm) + Release 2.0.0-alpha - 05-23-2012 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java index 7e793a59bd..1ed534c006 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java @@ -323,7 +323,7 @@ public static void waitForReplication(MiniDFSCluster cluster, ExtendedBlock b, */ public static void waitCorruptReplicas(FileSystem fs, FSNamesystem ns, Path file, ExtendedBlock b, int corruptRepls) - throws IOException, TimeoutException { + throws IOException, TimeoutException, InterruptedException { int count = 0; final int ATTEMPTS = 50; int repls = ns.getBlockManager().numCorruptReplicas(b.getLocalBlock()); @@ -337,6 +337,7 @@ public static void waitCorruptReplicas(FileSystem fs, FSNamesystem ns, System.out.println("Waiting for "+corruptRepls+" corrupt replicas"); repls = ns.getBlockManager().numCorruptReplicas(b.getLocalBlock()); count++; + Thread.sleep(1000); } if (count == ATTEMPTS) { throw new TimeoutException("Timed out waiting for corrupt replicas."