public class Ec2Snitch extends AbstractNetworkTopologySnitch
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
ec2region |
protected java.lang.String |
ec2zone |
protected static org.slf4j.Logger |
logger |
protected static java.lang.String |
ZONE_NAME_QUERY_URL |
Constructor and Description |
---|
Ec2Snitch() |
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
|
compareEndpoints
getSortedListByProximity, gossiperStarting, isWorthMergingForRangeQuery, sortByProximity
protected static final org.slf4j.Logger logger
protected static final java.lang.String ZONE_NAME_QUERY_URL
protected java.lang.String ec2zone
protected java.lang.String ec2region
public Ec2Snitch() throws java.io.IOException, ConfigurationException
java.io.IOException
ConfigurationException
public java.lang.String getRack(java.net.InetAddress endpoint)
AbstractNetworkTopologySnitch
getRack
in interface IEndpointSnitch
getRack
in class AbstractNetworkTopologySnitch
endpoint
- a specified endpointpublic java.lang.String getDatacenter(java.net.InetAddress endpoint)
AbstractNetworkTopologySnitch
getDatacenter
in interface IEndpointSnitch
getDatacenter
in class AbstractNetworkTopologySnitch
endpoint
- a specified endpointCopyright © 2009- The Apache Software Foundation