diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d139386a34f..d41439c3d7c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -698,6 +698,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) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java index 1864d81513a..df2238838db 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestRetryCacheWithHA.java @@ -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; }