Setup to trace consistency changes
Steps for tracing consistency changes.
To setup five nodes on your local computer, trace reads at different consistency levels, and then compare the results.
Procedure
-
Get the ccm library of scripts from github.
You will use this library in subsequent steps to perform the following actions:
- Download Apache Cassandra™ source code.
- Create and launch an Apache Cassandra cluster on a single computer.
Refer to the ccm README for prerequisites.
-
Set up loopback aliases. For example, enter the following commands on the
command line to set up the alias on the Mac. On some platforms, you can probably
skip this step.
sudo ifconfig lo0 alias 127.0.0.2 up $ sudo ifconfig lo0 alias 127.0.0.3 up $ sudo ifconfig lo0 alias 127.0.0.4 up $ sudo ifconfig lo0 alias 127.0.0.5 up
-
Download Apache Cassandra source code, version 2.1.0 for example, into the
/.ccm/repository, and start the ccm cluster named trace_consistency.
ccm create trace_consistency -v 2.1.0
Downloading http://archive.apache.org/dist/cassandra/2.1.0/apache-cassandra-2.1.0-src.tar.gz to /var/folders/9k/ywsprd8n14s7hzb5qnztgb5h0000gq/T/ccm-d7fGAN.tar.gz (15.750MB) 16514874 [100.00%] Extracting /var/folders/9k/ywsprd8n14s7hzb5qnztgb5h0000gq/T/ccm-d7fGAN.tar.gz as version 2.1.0 ... Compiling Cassandra 2.1.0 ... Current cluster is now: trace_consistency
-
Use the following commands to populate and check the cluster:
ccm populate -n 5 $ ccm start
-
Check that the cluster is up:
ccm node1 ring
The output shows the status of all five nodes.