ZanderXu commented on code in PR #8541:
URL: https://github.com/apache/hadoop/pull/8541#discussion_r3394081435
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java:
##########
@@ -90,6 +90,8 @@ public class DatanodeManager {
private volatile long heartbeatIntervalSeconds;
private volatile int heartbeatRecheckInterval;
+ /** Used by {@link HeartbeatManager}. */
+ private volatile long heartbeatRecheckIntervalForMonitor;
Review Comment:
How about moving it to `HeartbeatManager`?
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java:
##########
@@ -2213,6 +2216,19 @@ private void setHeartbeatInterval(long intervalSeconds,
this.heartbeatExpireInterval = 2L * recheckInterval + 10 * 1000
* intervalSeconds;
this.blockInvalidateLimit = getBlockInvalidateLimit(blockInvalidateLimit);
+ refreshHeartbeatRecheckIntervalForMonitor();
+ }
+
+ @VisibleForTesting
+ public void refreshHeartbeatRecheckIntervalForMonitor() {
Review Comment:
Move this method to `HeartbeatManager` and just change it if
`heartbeatRecheckInterval` is changed.
--
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]