HDFS-9300. TestDirectoryScanner.testThrottle() is still a little flakey. Contributed by Daniel Templeton.
(cherry picked from commit 3c0adac88c
)
This commit is contained in:
parent
4f135647fd
commit
4e423edd95
|
@ -602,7 +602,7 @@ public class TestDirectoryScanner {
|
|||
ratio = 0.0f;
|
||||
retries = maxRetries;
|
||||
|
||||
while ((retries > 0) && ((ratio < 3f) || (ratio > 4.5f))) {
|
||||
while ((retries > 0) && ((ratio < 2.75f) || (ratio > 4.5f))) {
|
||||
scanner = new DirectoryScanner(dataNode, fds, conf);
|
||||
ratio = runThrottleTest(blocks);
|
||||
retries -= 1;
|
||||
|
@ -611,7 +611,7 @@ public class TestDirectoryScanner {
|
|||
// Waiting should be about 4x running.
|
||||
LOG.info("RATIO: " + ratio);
|
||||
assertTrue("Throttle is too restrictive", ratio <= 4.5f);
|
||||
assertTrue("Throttle is too permissive", ratio >= 3.0f);
|
||||
assertTrue("Throttle is too permissive", ratio >= 2.75f);
|
||||
|
||||
// Test with more than 1 thread
|
||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_DIRECTORYSCAN_THREADS_KEY, 3);
|
||||
|
|
Loading…
Reference in New Issue