For me the outcome of the following queries are as follows:
ubuntu@ds201-node1:~$ /home/ubuntu/node1/resources/cassandra/bin/nodetool getendpoints killrvideo videos_by_tag 'cassandra' 127.0.0.1 127.0.0.2
As 127.0.0.3 belongs to the same rack, I brought down node 3.
ubuntu@ds201-node1:~$ /home/ubuntu/node1/bin/nodetool status Datacenter: east-side ===================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns Host ID Rack UN 127.0.0.2 279.95 KiB 128 ? 1a713c39-8657-45c9-806b-124a2a60dc35 hakuna-matata Datacenter: west-side ===================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns Host ID Rack UN 127.0.0.1 224.74 KiB 128 ? 3ac39308-3d02-44a4-aa12-449a9ab4fa16 hakuna-matata DN 127.0.0.3 256.42 KiB 128 ? 0bad66bc-ebdb-47b4-b783-75a5fefc8737 hakuna-matata
After that when I set the consistency to two, I was expected get an error but I got it right as shown below:
cqlsh> consistency two; Consistency level set to TWO. cqlsh> consistency Current consistency level is TWO. cqlsh> SELECT * FROM killrvideo.videos_by_tag WHERE tag = 'cassandra'; tag | added_date | video_id | title -----------+---------------------------------+--------------------------------------+------------------- cassandra | 2016-02-08 00:00:00.000000+0000 | 2ff2e01a-b050-4a92-a277-0bae12dbd6df | Me Lava Cassandra cassandra | 2014-01-29 00:00:00.000000+0000 | 1645ea59-14bd-11e5-a993-8138354b7e31 | Cassandra History cassandra | 2013-03-17 00:00:00.000000+0000 | 3452f7de-14bd-11e5-855e-8738355b7e3a | Cassandra Intro cassandra | 2012-04-03 00:00:00.000000+0000 | 245e8024-14bd-11e5-9743-8238356b7e32 | Cassandra & SSDs
Question: Can someone tell me did I misunderstand the instruction and brought down the incorrect node.
Please advise if you need any other information.
Thanks in advance!