[
https://issues.apache.org/jira/browse/HDFS-15920?focusedWorklogId=573381&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-573381
]
ASF GitHub Bot logged work on HDFS-15920:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Mar/21 09:34
Start Date: 29/Mar/21 09:34
Worklog Time Spent: 10m
Work Description: jianghuazhu commented on a change in pull request #2831:
URL: https://github.com/apache/hadoop/pull/2831#discussion_r603147685
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManagerSafeMode.java
##########
@@ -640,7 +643,17 @@ private void reportStatus(String msg, boolean rightNow) {
*/
private class SafeModeMonitor implements Runnable {
/** Interval in msec for checking safe mode. */
- private static final long RECHECK_INTERVAL = 1000;
+ private long recheckInterval = 1000;
+
+ public SafeModeMonitor() {
+ Configuration conf = new HdfsConfiguration();
+ long interval = conf.getLong(
+ DFS_NAMENODE_SAFEMODE_RECHECK_INTERVAL_KEY,
+ DFS_NAMENODE_SAFEMODE_RECHECK_INTERVAL_DEFAULT);
+ if (interval > 0) {
+ recheckInterval = interval;
Review comment:
@ayushtkn , thank you very much for your suggestions, I will submit some
improved codes later.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 573381)
Time Spent: 0.5h (was: 20m)
> Solve the problem that the value of SafeModeMonitor#RECHECK_INTERVAL can be
> configured
> --------------------------------------------------------------------------------------
>
> Key: HDFS-15920
> URL: https://issues.apache.org/jira/browse/HDFS-15920
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: JiangHua Zhu
> Assignee: JiangHua Zhu
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The current SafeModeMonitor#RECHECK_INTERVAL value has a fixed value (=1000),
> and this value should be set and configurable. Because the lock is occupied
> internally, it competes with other places.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]