[
https://issues.apache.org/jira/browse/HDFS-17019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17725216#comment-17725216
]
ASF GitHub Bot commented on HDFS-17019:
---------------------------------------
ZanderXu commented on code in PR #5671:
URL: https://github.com/apache/hadoop/pull/5671#discussion_r1201570774
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java:
##########
@@ -376,10 +373,14 @@ public void initSlowPeerTracker(Configuration conf, Timer
timer,
this.slowPeerTracker = dataNodePeerStatsEnabled ?
new SlowPeerTracker(conf, timer) :
new SlowPeerDisabledTracker(conf, timer);
+ if (slowPeerTracker.isSlowPeerTrackerEnabled()) {
+ startSlowPeerCollector();
+ }
Review Comment:
should we stop the running thread if
`slowPeerTracker.isSlowPeerTrackerEnabled()` return `false`?
> Optimize the logic for reconfigure slow peer enable for Namenode
> -----------------------------------------------------------------
>
> Key: HDFS-17019
> URL: https://issues.apache.org/jira/browse/HDFS-17019
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Haiyang Hu
> Assignee: Haiyang Hu
> Priority: Major
>
> The logic of Reconfigure slow peer enable for Namenode requires the following
> optimizations:
> 1.Make SlowPeerTracker slowPeerTracker volatile.
> 2.When starting the NameNode, if the parameter
> dfs.datanode.peer.stats.enabled is set to false,
> DatanodeManager#startSlowPeerCollector() will not call, as a result the Slow
> peers collection thread 'slowPeerCollectorDaemon' will not be started .
> If the parameter dfs.datanode.peer.stats.enabled is dynamically refreshed to
> true, the current logic will not call
> DatanodeManager#startSlowPeerCollector(), which to thread
> 'slowPeerCollectorDaemon' not started as expected, so we will optimize here
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]