Class ThrottledAsyncChecker<K,V>

java.lang.Object
org.apache.hadoop.hdfs.server.datanode.checker.ThrottledAsyncChecker<K,V>
All Implemented Interfaces:
AsyncChecker<K,V>

@Private @Unstable public class ThrottledAsyncChecker<K,V> extends Object implements AsyncChecker<K,V>
An implementation of AsyncChecker that skips checking recently checked objects. It will enforce at least minMsBetweenChecks milliseconds between two successive checks of any one object. It is assumed that the total number of Checkable objects in the system is small, (not more than a few dozen) since the checker uses O(Checkables) storage and also potentially O(Checkables) threads. minMsBetweenChecks should be configured reasonably by the caller to avoid spinning up too many threads frequently.
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • ThrottledAsyncChecker

      public ThrottledAsyncChecker(org.apache.hadoop.util.Timer timer, long minMsBetweenChecks, long diskCheckTimeout, ExecutorService executorService)
  • Method Details