haiyang1987 commented on code in PR #5913:
URL: https://github.com/apache/hadoop/pull/5913#discussion_r1285713697
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyBlockManagement.java:
##########
@@ -97,4 +97,58 @@ public void testInvalidateBlock() throws Exception {
}
}
+ /**
+ * Test Standby/Observer NameNode should not handle redundant replica block
logic
+ * when set decrease replication.
+ * @throws Exception
+ */
+ @Test(timeout = 60000)
+ public void testNotHandleRedundantReplica() throws Exception {
+ Configuration conf = new Configuration();
+ HAUtil.setAllowStandbyReads(conf, true);
+ conf.setInt(DFSConfigKeys.DFS_HA_TAILEDITS_PERIOD_KEY, 1);
+
+ // Create HA Cluster.
+ try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf)
+
.nnTopology(MiniDFSNNTopology.simpleHATopology()).numDataNodes(10).build()) {
Review Comment:
yeah, here can set the number of datanode num to 4, which can also meet the
test requirements.
I will update PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]