tomscut commented on code in PR #5068:
URL: https://github.com/apache/hadoop/pull/5068#discussion_r1008773817
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNameNodeReconfigure.java:
##########
@@ -567,6 +571,92 @@ private List<Boolean> validatePeerReport(String
jsonReport) {
return containReport;
}
+ @Test
+ public void testReconfigureDecommissionBackoffMonitorParameters()
+ throws ReconfigurationException, IOException {
+ Configuration conf = new HdfsConfiguration();
+ conf.setClass(DFSConfigKeys.DFS_NAMENODE_DECOMMISSION_MONITOR_CLASS,
+ DatanodeAdminBackoffMonitor.class,
DatanodeAdminMonitorInterface.class);
+ int defaultPendingRepLimit = 1000;
+ conf.setInt(DFS_NAMENODE_DECOMMISSION_BACKOFF_MONITOR_PENDING_LIMIT,
defaultPendingRepLimit);
+ int defaultBlocksPerLock = 1000;
+
conf.setInt(DFS_NAMENODE_DECOMMISSION_BACKOFF_MONITOR_PENDING_BLOCKS_PER_LOCK,
+ defaultBlocksPerLock);
+ MiniDFSCluster newCluster = new MiniDFSCluster.Builder(conf).build();
+ newCluster.waitActive();
+
+ try {
Review Comment:
```suggestion
try (MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build()) {
newCluster.waitActive();
```
Please also update this by the way.
--
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]