org.apache.hadoop.hbase
Class HDFSBlocksDistribution.HostAndWeight

java.lang.Object
  extended by 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.


Nested Class Summary
static class HDFSBlocksDistribution.HostAndWeight.WeightComparator
          comparator used to sort hosts based on weight
 
Constructor Summary
HDFSBlocksDistribution.HostAndWeight(String host, long weight)
          Constructor
 
Method Summary
 void addWeight(long weight)
          add weight
 String getHost()
           
 long getWeight()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HDFSBlocksDistribution.HostAndWeight

public HDFSBlocksDistribution.HostAndWeight(String host,
                                            long weight)
Constructor

Parameters:
host - the host name
weight - the weight
Method Detail

addWeight

public void addWeight(long weight)
add weight

Parameters:
weight - the weight

getHost

public String getHost()
Returns:
the host name

getWeight

public long getWeight()
Returns:
the weight


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.