public static class HDFSBlocksDistribution.HostAndWeight extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HDFSBlocksDistribution.HostAndWeight.WeightComparator
Comparator used to sort hosts based on weight
|
| Modifier and Type | Field and Description |
|---|---|
private String |
host |
private long |
weight |
private long |
weightForSsd |
| Constructor and Description |
|---|
HostAndWeight(String host,
long weight,
long weightForSsd)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addWeight(long weight,
long weightForSsd)
add weight
|
String |
getHost()
Returns the host name
|
long |
getWeight()
Returns the weight
|
long |
getWeightForSsd()
Returns the weight for ssd
|
private long weight
private long weightForSsd
public HostAndWeight(String host, long weight, long weightForSsd)
host - the host nameweight - the weightweightForSsd - the weight for ssdpublic void addWeight(long weight, long weightForSsd)
weight - the weightweightForSsd - the weight for ssdpublic long getWeight()
public long getWeightForSsd()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.