Database Reference
In-Depth Information
Property File
As with the rest of the snitches, the PropertyFileSnitch helps to determine the loc-
ation of nodes by rack and data center. The difference here is that the layout is
user defined. This is good for more complex groupings that may lack uniformity
(such as with the RackInferringSnitch and the EC2-based snitches). The property
file for the Cassandra node sits in the same directory as the cassandra.yaml file. It
is named cassandra-topology.properties.
PropertyFileSnitch Configuration
Using the PropertyFileSnitch is difficult if you have a large cluster that is not under
some configuration management (such as Chef or Puppet). The cassandra-topo-
logy.properties file must be in sync on every machine in the cluster for everything
to work properly. And every node in the cluster must be in this file. The typical
use case for the PropertyFileSnitch is when you have nonuniform IPs in multiple
data centers. The ability to specify which IPs sit in which racks and which data
centers is powerful for configuring a complex setup. Listing 5.3 shows an example
cassandra-topology.properties file. In this file, there are two data centers with two
racks each. In both racks, the IPs are laid out in a nonuniform fashion.
Listing 5.3 Example cassandra-topology.properties File. Setting Up Two
Physical Data Centers with Two Racks Each, All with a Nonuniform Layout
of IPs
# Data Center One
19.82.20.3=DC1:RAC1
19.83.123.233=DC1:RAC1
19.84.193.101=DC1:RAC1
19.85.13.6=DC1:RAC1
19.23.20.87=DC1:RAC2
19.15.16.200=DC1:RAC2
19.24.102.103=DC1:RAC2
# Data Center Two
29.51.8.2=DC2:RAC1
29.50.10.21=DC2:RAC1
29.50.29.14=DC2:RAC1
 
Search WWH ::




Custom Search