Hexiaoqiao commented on code in PR #6112:
URL: https://github.com/apache/hadoop/pull/6112#discussion_r1337110886
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeReconfigure.java:
##########
@@ -654,6 +655,52 @@ public void
testReconfigureDecommissionBackoffMonitorParameters()
}
}
+ @Test
+ public void testReconfigureMinBlocksForWrite() throws Exception {
+ final NameNode nameNode = cluster.getNameNode(0);
+ final BlockManager bm = nameNode.getNamesystem().getBlockManager();
+ String key =
DFSConfigKeys.DFS_NAMENODE_BLOCKPLACEMENTPOLICY_MIN_BLOCKS_FOR_WRITE_KEY;
+ int defaultVal =
DFSConfigKeys.DFS_NAMENODE_BLOCKPLACEMENTPOLICY_MIN_BLOCKS_FOR_WRITE_DEFAULT;
+
+ // Ensure we cannot set any of the parameters negative
+ ReconfigurationException reconfigurationException =
+ LambdaTestUtils.intercept(ReconfigurationException.class,
+ () -> nameNode.reconfigurePropertyImpl(key, "-20"));
+ assertTrue(reconfigurationException.getCause() instanceof
IllegalArgumentException);
+ assertEquals(key+" = '-20' is invalid. It should be a "
Review Comment:
Leave blank space before and after plus sign. The same as L671,L680,L681
--
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]