public class Ec2Snitch extends AbstractNetworkTopologySnitch
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
Constructor and Description |
---|
Ec2Snitch() |
Ec2Snitch(SnitchProperties props) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDatacenter(InetAddressAndPort endpoint)
Return the data center for which an endpoint resides in
|
java.lang.String |
getRack(InetAddressAndPort endpoint)
Return the rack for which an endpoint resides in
|
boolean |
validate(java.util.Set<java.lang.String> datacenters,
java.util.Set<java.lang.String> racks)
Determine if the datacenter or rack values in the current node's snitch conflict with those passed in parameters.
|
compareEndpoints
gossiperStarting, isWorthMergingForRangeQuery, sortedByProximity
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDatacenter, getLocalDatacenter, getLocalRack
public Ec2Snitch() throws java.io.IOException, ConfigurationException
java.io.IOException
ConfigurationException
public Ec2Snitch(SnitchProperties props) throws java.io.IOException, ConfigurationException
java.io.IOException
ConfigurationException
public java.lang.String getRack(InetAddressAndPort endpoint)
AbstractNetworkTopologySnitch
getRack
in interface IEndpointSnitch
getRack
in class AbstractNetworkTopologySnitch
endpoint
- a specified endpointpublic java.lang.String getDatacenter(InetAddressAndPort endpoint)
AbstractNetworkTopologySnitch
getDatacenter
in interface IEndpointSnitch
getDatacenter
in class AbstractNetworkTopologySnitch
endpoint
- a specified endpointpublic boolean validate(java.util.Set<java.lang.String> datacenters, java.util.Set<java.lang.String> racks)
IEndpointSnitch
Copyright © 2009-2021 The Apache Software Foundation