Class DiskNormalizedCostBalancerStrategy

  • All Implemented Interfaces:
    BalancerStrategy

    public class DiskNormalizedCostBalancerStrategy
    extends CostBalancerStrategy
    A BalancerStrategy which can be used when historicals in a tier have varying disk capacities. This strategy normalizes the cost of placing a segment on a server as calculated by CostBalancerStrategy by doing the following:
    • Divide the cost by the number of segments on the server. This ensures that cost does not increase just because the number of segments on a server is higher.
    • Multiply the resulting value by disk usage ratio. This ensures that all hosts have equivalent levels of percentage disk utilization.
    i.e. to place a segment on a given server
     cost = as computed by CostBalancerStrategy
     normalizedCost = (cost / numSegments) * usageRatio
                    = (cost / numSegments) * (diskUsed / totalDiskSpace)
     
    • Constructor Detail

      • DiskNormalizedCostBalancerStrategy

        public DiskNormalizedCostBalancerStrategy​(com.google.common.util.concurrent.ListeningExecutorService exec)