cassandra – yaml & cassandra-rackdc.properties – Initializing a multiple node cluster (single datacenter)

Prerequisites

Each node must be correctly configured before starting the cluster. You must determine or perform the following before starting the cluster:

This example describes installing a 6 node cluster spanning 2 racks in a single data center. Each node is configured to use the GossipingPropertyFileSnitch and 256 virtual nodes (vnodes).

Procedure

  1. Suppose you install Cassandra on these nodes:
    node0 110.82.155.0 (seed1)
    node1 110.82.155.1
    node2 110.82.155.2
    node3 110.82.156.3 (seed2)
    node4 110.82.156.4
    node5 110.82.156.5
    Note: It is a best practice to have more than one seed node per datacenter.
  2. If you have a firewall running in your cluster, you must open certain ports for communication between the nodes. See Configuring firewall port access.
  3. If Cassandra is running, you must stop the server and clear the data:

    Doing this removes the default cluster_name (Test Cluster) from the system table. All nodes must use the same cluster name.

    If Cassandra is running, you must stop the server and clear the data:

    Doing this removes the default cluster_name (Test Cluster) from the system table. All nodes must use the same cluster name.

    Package installations:

    1. Stop Cassandra:
      $ sudo service cassandra stop
    2. Clear the data:
      $ sudo rm -rf /var/lib/cassandra/data/system/*