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
public class Ec2MultiRegionSnitch extends Ec2Snitch
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
Fields Modifier and Type Field Description protected org.apache.cassandra.locator.AbstractCloudMetadataServiceConnector
connector
-
Fields inherited from class org.apache.cassandra.locator.Ec2Snitch
ZONE_NAME_QUERY
-
-
Constructor Summary
Constructors Constructor Description Ec2MultiRegionSnitch()
Ec2MultiRegionSnitch(SnitchProperties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDatacenter(InetAddressAndPort endpoint)
Return the data center for which an endpoint resides injava.lang.String
getLocalDatacenter()
returns a String representing the datacenter current endpoint belongs tojava.lang.String
getLocalRack()
returns a String representing the rack current endpoint belongs tojava.lang.String
getRack(InetAddressAndPort endpoint)
Return the rack for which an endpoint resides invoid
gossiperStarting()
called after Gossiper instance exists immediately before it starts gossiping-
Methods inherited from class org.apache.cassandra.locator.AbstractNetworkTopologySnitch
compareEndpoints
-
Methods inherited from class org.apache.cassandra.locator.AbstractEndpointSnitch
isWorthMergingForRangeQuery, sortedByProximity
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.locator.IEndpointSnitch
getDatacenter, getDatacenter
-
-
-
-
Constructor Detail
-
Ec2MultiRegionSnitch
public Ec2MultiRegionSnitch() throws java.io.IOException, ConfigurationException
- Throws:
java.io.IOException
ConfigurationException
-
Ec2MultiRegionSnitch
public Ec2MultiRegionSnitch(SnitchProperties props) throws java.io.IOException, ConfigurationException
- Throws:
java.io.IOException
ConfigurationException
-
-
Method Detail
-
gossiperStarting
public void gossiperStarting()
Description copied from interface:IEndpointSnitch
called after Gossiper instance exists immediately before it starts gossiping- Specified by:
gossiperStarting
in interfaceIEndpointSnitch
- Overrides:
gossiperStarting
in classAbstractEndpointSnitch
-
getLocalRack
public final java.lang.String getLocalRack()
Description copied from interface:IEndpointSnitch
returns a String representing the rack current endpoint belongs to
-
getLocalDatacenter
public final java.lang.String getLocalDatacenter()
Description copied from interface:IEndpointSnitch
returns a String representing the datacenter current endpoint belongs to
-
getRack
public final java.lang.String getRack(InetAddressAndPort endpoint)
Description copied from class:AbstractNetworkTopologySnitch
Return the rack for which an endpoint resides in- Specified by:
getRack
in interfaceIEndpointSnitch
- Specified by:
getRack
in classAbstractNetworkTopologySnitch
- Parameters:
endpoint
- a specified endpoint- Returns:
- string of rack
-
getDatacenter
public final java.lang.String getDatacenter(InetAddressAndPort endpoint)
Description copied from class:AbstractNetworkTopologySnitch
Return the data center for which an endpoint resides in- Specified by:
getDatacenter
in interfaceIEndpointSnitch
- Specified by:
getDatacenter
in classAbstractNetworkTopologySnitch
- Parameters:
endpoint
- a specified endpoint- Returns:
- string of data center
-
-