Browse Source

HDFS-9904. testCheckpointCancellationDuringUpload occasionally fails. Contributed by Lin Yiqun.

(cherry picked from commit d4574017845cfa7521e703f80efd404afd09b8c4)
Kihwal Lee 9 năm trước cách đây
mục cha
commit
b8e73cff8f

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -141,6 +141,9 @@ Release 2.7.3 - UNRELEASED
     HDFS-9812. Streamer threads leak if failure happens when closing
     DFSOutputStream. (Lin Yiqun via aajisaka)
 
+    HDFS-9904. testCheckpointCancellationDuringUpload occasionally fails.
+    (Lin Yiqun via kihwal)
+
 Release 2.7.2 - 2016-01-25
 
   INCOMPATIBLE CHANGES

+ 5 - 0
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java

@@ -283,6 +283,11 @@ public class TestStandbyCheckpoints {
    */
   @Test(timeout=60000)
   public void testCheckpointCancellationDuringUpload() throws Exception {
+    // Set dfs.namenode.checkpoint.txns differently on the first NN to avoid it
+    // doing checkpoint when it becomes a standby
+    cluster.getConfiguration(0).setInt(
+        DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_TXNS_KEY, 1000);
+
     // don't compress, we want a big image
     cluster.getConfiguration(0).setBoolean(
         DFSConfigKeys.DFS_IMAGE_COMPRESS_KEY, false);