org.apache.hadoop.hbase
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HDFSBlocksDistribution.HostAndWeight
public HDFSBlocksDistribution.HostAndWeight(String host,
long weight)
- Constructor
- Parameters:
host
- the host nameweight
- the weight
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.