Author: wheat9 Date: Thu Mar 6 18:52:38 2014 New Revision: 1574999 URL: http://svn.apache.org/r1574999 Log: Merge r1574997 from trunk.
Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1574999&r1=1574998&r2=1574999&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Thu Mar 6 18:52:38 2014 @@ -312,6 +312,8 @@ Release 2.4.0 - UNRELEASED HDFS-6058. Fix TestHDFSCLI failures after HADOOP-8691 change. (Akira Ajisaka via wheat9) + HDFS-6062. TestRetryCacheWithHA#testConcat is flaky. (Jing Zhao via wheat9) + BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9) Modified: hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java?rev=1574999&r1=1574998&r2=1574999&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java (original) +++ hadoop/common/branches/branch-2/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java Thu Mar 6 18:52:38 2014 @@ -562,10 +562,12 @@ public class TestRetryCacheWithHA { @Override void prepare() throws Exception { - DFSTestUtil.createFile(dfs, new Path(target), BlockSize, DataNodes, 0); + final Path targetPath = new Path(target); + DFSTestUtil.createFile(dfs, targetPath, BlockSize, DataNodes, 0); for (int i = 0; i < srcPaths.length; i++) { DFSTestUtil.createFile(dfs, srcPaths[i], BlockSize, DataNodes, 0); } + assertEquals(BlockSize, dfs.getFileStatus(targetPath).getLen()); } @Override @@ -576,10 +578,12 @@ public class TestRetryCacheWithHA { @Override boolean checkNamenodeBeforeReturn() throws Exception { Path targetPath = new Path(target); - boolean done = dfs.exists(targetPath); + boolean done = dfs.getFileStatus(targetPath).getLen() == BlockSize + * (srcs.length + 1); for (int i = 0; i < CHECKTIMES && !done; i++) { Thread.sleep(1000); - done = dfs.exists(targetPath); + done = dfs.getFileStatus(targetPath).getLen() == BlockSize + * (srcs.length + 1); } return done; }