Beispiel #1
0
        /// <summary>
        /// Compute all the replication and invalidation work for the
        /// given BlockManager.
        /// </summary>
        /// <remarks>
        /// 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
        /// <see cref="Org.Apache.Hadoop.Hdfs.DFSConfigKeys.DfsNamenodeReplicationMaxStreamsKey
        ///     "/>
        /// to
        /// a high value to ensure that all work is calculated.
        /// </remarks>
        public static int ComputeAllPendingWork(BlockManager bm)
        {
            int work = ComputeInvalidationWork(bm);

            work += bm.ComputeReplicationWork(int.MaxValue);
            return(work);
        }