cxzl25 commented on code in PR #8824:
URL: https://github.com/apache/hadoop/pull/8824#discussion_r4765689789
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDirectoryScanner.java:
##########
@@ -156,6 +157,72 @@ public void testInvalidDirectoryScanThreadsUsesDefault()
throws Exception {
}
}
+ /**
+ * HDFS-17995: The scanner should wait the configured interval between the
+ * end of one scan and the start of the next one, so a scan that takes
+ * longer than the interval does not cause scans to run back-to-back.
+ */
+ @Test
+ @Timeout(value = 60)
+ public void testScanScheduledWithFixedDelay() throws Exception {
+ final long intervalMs = 1000L;
+ final long slowScanMs = 1500L;
+ final int expectedScans = 3;
+ Configuration conf = getConfiguration();
+ cluster = new MiniDFSCluster.Builder(conf).numDataNodes(1).build();
Review Comment:
Done.
--
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]