From 8b00d9de251e11e7d31b0ca7f51b05a34d939d7e Mon Sep 17 00:00:00 2001 From: Kihwal Lee Date: Tue, 15 Mar 2016 10:54:37 -0500 Subject: [PATCH] HDFS-9904. testCheckpointCancellationDuringUpload occasionally fails. Contributed by Lin Yiqun. (cherry picked from commit d4574017845cfa7521e703f80efd404afd09b8c4) --- .../hdfs/server/namenode/ha/TestStandbyCheckpoints.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java index e0c55633b33..e17e5529e52 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java @@ -284,6 +284,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);