public class CloudstackSnitch extends AbstractNetworkTopologySnitch
A snitch that assumes a Cloudstack Zone follows the typical convention
<country>-<location>-<availability zone> and uses the country/location
tuple as a datacenter and the availability zone as a rack
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
csZoneDc |
protected java.lang.String |
csZoneRack |
protected static org.slf4j.Logger |
logger |
protected static java.lang.String |
ZONE_NAME_QUERY_URI |
| Constructor and Description |
|---|
CloudstackSnitch() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDatacenter(java.net.InetAddress endpoint)
Return the data center for which an endpoint resides in
|
java.lang.String |
getRack(java.net.InetAddress endpoint)
Return the rack for which an endpoint resides in
|
compareEndpointsgetSortedListByProximity, gossiperStarting, isWorthMergingForRangeQuery, sortByProximityprotected static final org.slf4j.Logger logger
protected static final java.lang.String ZONE_NAME_QUERY_URI
protected java.lang.String csZoneDc
protected java.lang.String csZoneRack
public CloudstackSnitch()
throws java.io.IOException,
ConfigurationException
java.io.IOExceptionConfigurationExceptionpublic java.lang.String getRack(java.net.InetAddress endpoint)
AbstractNetworkTopologySnitchgetRack in interface IEndpointSnitchgetRack in class AbstractNetworkTopologySnitchendpoint - a specified endpointpublic java.lang.String getDatacenter(java.net.InetAddress endpoint)
AbstractNetworkTopologySnitchgetDatacenter in interface IEndpointSnitchgetDatacenter in class AbstractNetworkTopologySnitchendpoint - a specified endpointCopyright © 2016 The Apache Software Foundation