Skip to content

Instantly share code, notes, and snippets.

@pcn
Last active January 3, 2016 03:59
Show Gist options
  • Select an option

  • Save pcn/8405542 to your computer and use it in GitHub Desktop.

Select an option

Save pcn/8405542 to your computer and use it in GitHub Desktop.
Testing writes on cassandra 1.2 with cassandra-stress
git clone https://github.com/apache/cassandra.git
cd cassandra
git checkout cassandra-1.2.13
ant
# Note, if you're doing what I'm doing, and building cassandra+stress at 1.2.13, then running it against a
# 1.0 cluster then it won't work without setting the CASSANDRA_INCLUDE env for the stress script:
# CASSANDRA_INCLUDE=tools/bin/cassandra.in.sh tools/bin/cassandra-stress/cassandra.in.sh
# Set up the test, insert
tools/bin/cassandra-stress -d 0.0.0.0 -l 3 -e ALL -o INSERT
# Read test, ensure everything is there on all nodes
tools/bin/cassandra-stress -d 0.0.0.0 -l 3 -e ALL -o READ
# when that succeeds, run it again, but stop a node. It should fail hard.
tools/bin/cassandra-stress -d 0.0.0.0 -l 3 -e ALL -o READ
total,interval_op_rate,interval_key_rate,latency/95th/99.9th,elapsed_time
23025,2302,2302,12.6,70.1,110.3,10 # <--- pull the plug here
Operation [44021] retried 10 times - error reading key 0444514 ((UnavailableException))
Operation [44039] retried 10 times - error reading key 0467883 ((UnavailableException))
[etc., errors continue]
44011,2098,2098,12.4,67.7,110.3,18
FAILURE
# On the node, shutdown -h now. Wait for the autoscale group to re-launch it.
# With < 1.2.13 having trouble with automatic replace token. However if I add this to /etc/sv/cassandra/run:
# -Dcassandra.replace_address=54.196.187.21 \
# and delete any content from the box, then I can get a proper read.
# With 1.2.13, this works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment