Package org.apache.hadoop.hbase
Class HDFSBlocksDistribution.HostAndWeight
java.lang.Object
org.apache.hadoop.hbase.HDFSBlocksDistribution.HostAndWeight
- Enclosing class:
- HDFSBlocksDistribution
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
Modifier and TypeClassDescriptionstatic class
Comparator used to sort hosts based on weight -
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
host
-
weight
-
weightForSsd
-
-
Constructor Details
-
HostAndWeight
Constructor- Parameters:
host
- the host nameweight
- the weightweightForSsd
- the weight for ssd
-
-
Method Details
-
addWeight
add weight- Parameters:
weight
- the weightweightForSsd
- the weight for ssd
-
getHost
Returns the host name -
getWeight
Returns the weight -
getWeightForSsd
Returns the weight for ssd
-