[ https://issues.apache.org/jira/browse/HDFS-16331?focusedWorklogId=687769&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-687769 ]
ASF GitHub Bot logged work on HDFS-16331: ----------------------------------------- Author: ASF GitHub Bot Created on: 30/Nov/21 05:25 Start Date: 30/Nov/21 05:25 Worklog Time Spent: 10m Work Description: tasanuma commented on a change in pull request #3676: URL: https://github.com/apache/hadoop/pull/3676#discussion_r758940164 ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeReconfiguration.java ########## @@ -293,4 +295,76 @@ private void testAcquireOnMaxConcurrentMoversReconfiguration( assertEquals("should not be able to get thread quota", false, dataNode.xserver.balanceThrottler.acquire()); } + + @Test + public void testBlockReportIntervalReconfiguration() + throws ReconfigurationException, IOException { + int blockReportInterval = 300 * 1000; + for (int i = 0; i < NUM_DATA_NODE; i++) { + DataNode dn = cluster.getDataNodes().get(i); + + // Try invalid values. + try { + dn.reconfigureProperty( + DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, "text"); + fail("ReconfigurationException expected"); + } catch (ReconfigurationException expected) { + assertTrue("expecting NumberFormatException", + expected.getCause() instanceof NumberFormatException); + } + try { + dn.reconfigureProperty( + DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, + String.valueOf(-1)); + fail("ReconfigurationException expected"); + } catch (ReconfigurationException expected) { + assertTrue("expecting IllegalArgumentException", + expected.getCause() instanceof IllegalArgumentException); + } + + // Change properties. + dn.reconfigureProperty(DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, + String.valueOf(blockReportInterval)); + + // Verify change. + BlockPoolManager blockPoolManager = new BlockPoolManager(dn); + blockPoolManager.refreshNamenodes(dn.getConf()); Review comment: You may not need to call `#refreshNamenodes()` here. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 687769) Time Spent: 4h (was: 3h 50m) > Make dfs.blockreport.intervalMsec reconfigurable > ------------------------------------------------ > > Key: HDFS-16331 > URL: https://issues.apache.org/jira/browse/HDFS-16331 > Project: Hadoop HDFS > Issue Type: New Feature > Reporter: tomscut > Assignee: tomscut > Priority: Major > Labels: pull-request-available > Attachments: image-2021-11-18-09-33-24-236.png, > image-2021-11-18-09-35-35-400.png > > Time Spent: 4h > Remaining Estimate: 0h > > We have a cold data cluster, which stores as EC policy. There are 24 fast > disks on each node and each disk is 7 TB. > Recently, many nodes have more than 10 million blocks, and the interval of > FBR is 6h as default. Frequent FBR caused great pressure on NN. > !image-2021-11-18-09-35-35-400.png|width=334,height=229! > !image-2021-11-18-09-33-24-236.png|width=566,height=159! > We want to increase the interval of FBR, but have to rolling restart the DNs, > this operation is very heavy. In this scenario, it is necessary to make > _dfs.blockreport.intervalMsec_ reconfigurable. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org