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. This example uses ccm, a tool for running multiple nodes of Cassandra on a local computer.
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.
-
Optional: For Mac computers, set up loopback aliases. All other platforms, 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 into the /.ccm/repository.
-
Start the ccm cluster named
trace_consistency
using Cassandra version 3.0.5. The source code to run the cluster will automatically download and compile.$ ccm create trace_consistency -v 3.0.5
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. -
Connect cqlsh to the first node in the ring.
$ ccm node1 cqlsh