Class HDFSBlocksDistribution.HostAndWeight

java.lang.Object
org.apache.hadoop.hbase.HDFSBlocksDistribution.HostAndWeight
Enclosing class:
HDFSBlocksDistribution

public static class HDFSBlocksDistribution.HostAndWeight extends Object
Stores the hostname and weight for that hostname. This is used when determining the physical locations of the blocks making up a region. To make a prioritized list of the hosts holding the most data of a region, this class is used to count the total weight for each host. The weight is currently just the size of the file.
  • Field Details

  • Constructor Details

    • HostAndWeight

      public HostAndWeight(String host, long weight, long weightForSsd)
      Constructor
      Parameters:
      host - the host name
      weight - the weight
      weightForSsd - the weight for ssd
  • Method Details

    • addWeight

      public void addWeight(long weight, long weightForSsd)
      add weight
      Parameters:
      weight - the weight
      weightForSsd - the weight for ssd
    • getHost

      public String getHost()
      Returns the host name
    • getWeight

      public long getWeight()
      Returns the weight
    • getWeightForSsd

      public long getWeightForSsd()
      Returns the weight for ssd