/** * Compute all the replication and invalidation work for the * given BlockManager. * * This differs from the above functions in that it computes * replication work for all DNs rather than a particular subset, * regardless of invalidation/replication limit configurations. * * NB: you may want to set * {@link DFSConfigKeys#DFS_NAMENODE_REPLICATION_MAX_STREAMS_KEY} to * a high value to ensure that all work is calculated. */ public static int computeAllPendingWork(BlockManager bm) { int work = computeInvalidationWork(bm); work += bm.computeReplicationWork(Integer.MAX_VALUE); return work; }
* this.blocksInvalidateWorkPct); int workFound = this.computeReplicationWork(blocksToProcess);
* this.blocksInvalidateWorkPct); int workFound = this.computeReplicationWork(blocksToProcess);