code: @Override
    public void heartbeat() throws InterruptedException {
      // skips replication in safe mode when not all workers are registered
      if (mSafeModeManager.isInSafeMode()) {
        return;
      }
  
      TimeUnit.SECONDS.sleep(mQuietPeriodSeconds);
      Set<Long> inodes;
  
      // Check the set of files that could possibly be under-replicated
      inodes = mInodeTree.getPinIdSet();
      check(inodes, mReplicationHandler, Mode.REPLICATE);
  
      // Check the set of files that could possibly be over-replicated
      inodes = mInodeTree.getReplicationLimitedFileIds();
      check(inodes, mReplicationHandler, Mode.EVICT);
    }
docs: {@inheritDoc}
  
  During this heartbeat, this class will check:
  <p>
  (1) Is there any block from the pinned files becomes under replicated (i.e., the number of
  existing copies is smaller than the target replication min for this file, possibly due to node
  failures), and schedule replicate jobs to increase the replication level when found;
  
  (2) Is there any blocks over replicated, schedule evict jobs to reduce the replication level.