-
-
Save bdeggleston/13fbb9e70c0c0bd277c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
ccm create 8070 | |
rm -rf data/hints | |
echo "creating cluster" | |
ccm populate -n 2 | |
echo | |
echo "starting cluster" | |
ccm start | |
echo | |
echo "creating tables" | |
ccm node1 cqlsh -x "CREATE KEYSPACE ks WITH REPLICATION={'class': 'SimpleStrategy', 'replication_factor':2}" | |
ccm node1 cqlsh -x "CREATE TABLE ks.tbl (k int primary key, v int)" | |
echo | |
echo "stopping node 0" | |
ccm node1 stop --not-gently | |
echo | |
echo "inserting data" | |
ccm node2 cqlsh -x "INSERT INTO ks.tbl (k, v) VALUES (0, 0)" | |
ccm node2 cqlsh -x "INSERT INTO ks.tbl (k, v) VALUES (1, 1)" | |
ccm node2 cqlsh -x "INSERT INTO ks.tbl (k, v) VALUES (2, 2)" | |
echo "hint files" `ls ~/.ccm/8070/node2/data/hints` | |
echo | |
echo "restarting node 1" | |
ccm node1 start & | |
tail -f ~/.ccm/8070/node2/logs/system.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment