Package org.apache.cassandra.locator
Class Ec2MultiRegionSnitch
java.lang.Object
org.apache.cassandra.locator.AbstractEndpointSnitch
org.apache.cassandra.locator.AbstractNetworkTopologySnitch
org.apache.cassandra.locator.Ec2Snitch
org.apache.cassandra.locator.Ec2MultiRegionSnitch
- All Implemented Interfaces:
IEndpointSnitch
1) Snitch will automatically set the public IP by querying the AWS API
2) Snitch will set the private IP as a Gossip application state.
3) Uses a helper class that implements IESCS and will reset the public IP connection if it is within the
same region to communicate via private IP.
Operational: All the nodes in this cluster needs to be able to (modify the
Security group settings in AWS) communicate via Public IP's.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.cassandra.locator.AbstractCloudMetadataServiceConnectorFields inherited from class org.apache.cassandra.locator.Ec2Snitch
ZONE_NAME_QUERY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringgetDatacenter(InetAddressAndPort endpoint) Return the data center for which an endpoint resides infinal Stringreturns a String representing the datacenter current endpoint belongs tofinal Stringreturns a String representing the rack current endpoint belongs tofinal StringgetRack(InetAddressAndPort endpoint) Return the rack for which an endpoint resides invoidcalled after Gossiper instance exists immediately before it starts gossipingMethods inherited from class org.apache.cassandra.locator.AbstractNetworkTopologySnitch
compareEndpointsMethods inherited from class org.apache.cassandra.locator.AbstractEndpointSnitch
isWorthMergingForRangeQuery, sortedByProximityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.locator.IEndpointSnitch
getDatacenter, getDatacenter
-
Field Details
-
connector
protected final org.apache.cassandra.locator.AbstractCloudMetadataServiceConnector connector
-
-
Constructor Details
-
Ec2MultiRegionSnitch
- Throws:
IOExceptionConfigurationException
-
Ec2MultiRegionSnitch
- Throws:
IOExceptionConfigurationException
-
-
Method Details
-
gossiperStarting
public void gossiperStarting()Description copied from interface:IEndpointSnitchcalled after Gossiper instance exists immediately before it starts gossiping- Specified by:
gossiperStartingin interfaceIEndpointSnitch- Overrides:
gossiperStartingin classAbstractEndpointSnitch
-
getLocalRack
Description copied from interface:IEndpointSnitchreturns a String representing the rack current endpoint belongs to -
getLocalDatacenter
Description copied from interface:IEndpointSnitchreturns a String representing the datacenter current endpoint belongs to -
getRack
Description copied from class:AbstractNetworkTopologySnitchReturn the rack for which an endpoint resides in- Specified by:
getRackin interfaceIEndpointSnitch- Specified by:
getRackin classAbstractNetworkTopologySnitch- Parameters:
endpoint- a specified endpoint- Returns:
- string of rack
-
getDatacenter
Description copied from class:AbstractNetworkTopologySnitchReturn the data center for which an endpoint resides in- Specified by:
getDatacenterin interfaceIEndpointSnitch- Specified by:
getDatacenterin classAbstractNetworkTopologySnitch- Parameters:
endpoint- a specified endpoint- Returns:
- string of data center
-