@Test public void heartbeatWhenTreeIsEmpty() throws Exception { mReplicationChecker.heartbeat(); Assert.assertEquals(EMPTY, mMockReplicationHandler.getEvictRequests()); Assert.assertEquals(EMPTY, mMockReplicationHandler.getReplicateRequests()); }
@Override public void heartbeat() throws InterruptedException { if (mSafeModeManager.isInSafeMode()) { return; } TimeUnit.SECONDS.sleep(mQuietPeriodSeconds); Set<Long> inodes; inodes = mInodeTree.getPinIdSet(); check(inodes, mReplicationHandler, Mode.REPLICATE); inodes = mInodeTree.getReplicationLimitedFileIds(); check(inodes, mReplicationHandler, Mode.EVICT); inodes = mInodeTree.getPinIdSet(); checkMisreplicated(inodes, mReplicationHandler); }
ReplicationChecker implements HeartbeatExecutor { @Override public void heartbeat() throws InterruptedException { if (mSafeModeManager.isInSafeMode()) { return; } TimeUnit.SECONDS.sleep(mQuietPeriodSeconds); Set<Long> inodes; inodes = mInodeTree.getPinIdSet(); check(inodes, mReplicationHandler, Mode.REPLICATE); inodes = mInodeTree.getReplicationLimitedFileIds(); check(inodes, mReplicationHandler, Mode.EVICT); inodes = mInodeTree.getPinIdSet(); checkMisreplicated(inodes, mReplicationHandler); } }
ReplicationChecker implements HeartbeatExecutor { @Override public void heartbeat() throws InterruptedException { if (mSafeModeManager.isInSafeMode()) { return; } TimeUnit.SECONDS.sleep(mQuietPeriodSeconds); Set<Long> inodes; inodes = mInodeTree.getPinIdSet(); check(inodes, mReplicationHandler, Mode.REPLICATE); inodes = mInodeTree.getReplicationLimitedFileIds(); check(inodes, mReplicationHandler, Mode.EVICT); inodes = mInodeTree.getPinIdSet(); checkMisreplicated(inodes, mReplicationHandler); } ReplicationChecker(InodeTree inodeTree, BlockMaster blockMaster,
      SafeModeManager safeModeManager, JobMasterClientPool jobMasterClientPool);  ReplicationChecker(InodeTree inodeTree, BlockMaster blockMaster,
      SafeModeManager safeModeManager, ReplicationHandler replicationHandler); }
ReplicationChecker implements HeartbeatExecutor { @Override public void heartbeat() throws InterruptedException { if (mSafeModeManager.isInSafeMode()) { return; } TimeUnit.SECONDS.sleep(mQuietPeriodSeconds); Set<Long> inodes; inodes = mInodeTree.getPinIdSet(); check(inodes, mReplicationHandler, Mode.REPLICATE); inodes = mInodeTree.getReplicationLimitedFileIds(); check(inodes, mReplicationHandler, Mode.EVICT); inodes = mInodeTree.getPinIdSet(); checkMisreplicated(inodes, mReplicationHandler); } ReplicationChecker(InodeTree inodeTree, BlockMaster blockMaster,
      SafeModeManager safeModeManager, JobMasterClientPool jobMasterClientPool);  ReplicationChecker(InodeTree inodeTree, BlockMaster blockMaster,
      SafeModeManager safeModeManager, ReplicationHandler replicationHandler); @Override void heartbeat(); @Override void close(); }
ReplicationChecker implements HeartbeatExecutor { @Override public void heartbeat() throws InterruptedException { if (mSafeModeManager.isInSafeMode()) { return; } TimeUnit.SECONDS.sleep(mQuietPeriodSeconds); Set<Long> inodes; inodes = mInodeTree.getPinIdSet(); check(inodes, mReplicationHandler, Mode.REPLICATE); inodes = mInodeTree.getReplicationLimitedFileIds(); check(inodes, mReplicationHandler, Mode.EVICT); inodes = mInodeTree.getPinIdSet(); checkMisreplicated(inodes, mReplicationHandler); } ReplicationChecker(InodeTree inodeTree, BlockMaster blockMaster,
      SafeModeManager safeModeManager, JobMasterClientPool jobMasterClientPool);  ReplicationChecker(InodeTree inodeTree, BlockMaster blockMaster,
      SafeModeManager safeModeManager, ReplicationHandler replicationHandler); @Override void heartbeat(); @Override void close();  }