Hexiaoqiao commented on code in PR #8999:
URL: https://github.com/apache/hadoop/pull/8999#discussion_r4597092092


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java:
##########
@@ -2467,21 +2467,20 @@ private String reconfHeartbeatInterval(final 
DatanodeManager datanodeManager,
       if (newVal == null) {
         // set to default
         datanodeManager.setHeartbeatInterval(DFS_HEARTBEAT_INTERVAL_DEFAULT);
-        return String.valueOf(DFS_HEARTBEAT_INTERVAL_DEFAULT);
       } else {
         long newInterval = getConf()
             .getTimeDurationHelper(DFS_HEARTBEAT_INTERVAL_KEY,
                 newVal, TimeUnit.SECONDS);
         datanodeManager.setHeartbeatInterval(newInterval);
-        return String.valueOf(datanodeManager.getHeartbeatInterval());
       }
+      LOG.info("RECONFIGURE* changed heartbeatInterval to {}",

Review Comment:
   This refactor seems not related to this PR. would you mind to file another 
new PR to update this?



##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestStandbyCheckpoints.java:
##########
@@ -550,6 +550,43 @@ public Boolean get() {
     }, 1000, 30000);
   }
 
+  /**
+   * Verify that the upload thread pool is shut down after each checkpoint
+   * round, so that repeated checkpoints do not leak TransferFsImageUpload
+   * threads when parallel upload is enabled. Core pool threads never time
+   * out, so without an explicit shutdown they would park on the pool's work
+   * queue forever.
+   */
+  @Test
+  @Timeout(value = 300)
+  public void testUploadThreadsTerminatedAfterCheckpoint() throws Exception {
+    for (int i = 1; i < NUM_NNS; i++) {
+      cluster.getConfiguration(i).setBoolean(
+          DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_PARALLEL_UPLOAD_ENABLED_KEY, 
true);
+    }
+    for (int i = 0; i < NUM_NNS; i++) {
+      cluster.restartNameNode(i);
+    }
+

Review Comment:
   Please remove redundant blank line.



-- 
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]

Reply via email to