Parcourir la source

HDFS-16042. DatanodeAdminMonitor scan should be delay based. Contributed by Ahmed Hussein.

Jim Brennan il y a 3 ans
Parent
commit
0f2b89b791

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminManager.java

@@ -148,7 +148,7 @@ public class DatanodeAdminManager {
       throw new RuntimeException("Unable to create the Decommission monitor " +
       throw new RuntimeException("Unable to create the Decommission monitor " +
           "from "+cls, e);
           "from "+cls, e);
     }
     }
-    executor.scheduleAtFixedRate(monitor, intervalSecs, intervalSecs,
+    executor.scheduleWithFixedDelay(monitor, intervalSecs, intervalSecs,
         TimeUnit.SECONDS);
         TimeUnit.SECONDS);
 
 
     LOG.debug("Activating DatanodeAdminManager with interval {} seconds, " +
     LOG.debug("Activating DatanodeAdminManager with interval {} seconds, " +