HI Team as mentioned in DS201 Consistency Exercise i bought one node (node1) in my case down , i have observed the following behavior which deviating from the exercise steps .
Question 1) By bringing node1(127.0.0.1) down , exercise says cqlsh should not connect IP that is (127.0.0.1) ,but am still able to connect on 127.0.0.1 .(is this expected)??
( see bold 127.0.0.1 is down)
ubuntu@ds201-node1:~/node3/bin$ ./dsetool status Warning: Not able to read Analytics Master data, SparkMaster data may not be correct. DC: east-side Workload: Cassandra Graph: no ====================================================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Server ID Address Load Owns VNodes Rack Health [0,1] UN 08-00-27-32-1E-DD 127.0.0.2 133.18 KiB ? 128 hakuna-mata 0.30 DC: west-side Workload: Cassandra Graph: no ====================================================== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Server ID Address Load Owns VNodes Rack Health [0,1] DN 08-00-27-32-1E-DD 127.0.0.1 114.67 KiB ? 128 hakuna-mata 0.30 UN 08-00-27-32-1E-DD 127.0.0.3 124.36 KiB ? 128 hakuna-mata 0.30
Step 2: when i am trying to connect cqlsh on node3 am still able to to connect on 127.0.0.1 with port number 9042
ubuntu@ds201-node1:~/node3/bin$ ./cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 4.0.0.2284 | DSE 6.0.0 | CQL spec 3.4.5 | DSE protocol v2] Use HELP for help. cqlsh>
Read and Write Consistency
Question 2a (step 11)
Exercise says making Consistency level TWO and execute the following query outcome :insert query should fail.( step 11 in the exercise), but am able to insert the data successfully is that expected ?
INSERT INTO killrvideo.videos_by_tag (tag, added_date, video_id, title) VALUES ('cassandra', '2016-2-8', uuid(), 'Cassandra Write Test');
Actual Result:
insert was successful (Observe Bold)
cqlsh:killrvideo> INSERT INTO killrvideo.videos_by_tag (tag, added_date, video_id, title) ... VALUES ('cassandra', '2016-2-8', uuid(), 'Cassandra Write Test');
cqlsh:killrvideo> select * from videos_by_tag ; NoHostAvailable: .
cqlsh:killrvideo> CONSISTENCY ONE; Consistency level set to ONE. cqlsh:killrvideo> select * from videos_by_tag ;tag | added_date | video_id | title -----------+---------------------------------+--------------------------------------+------------------------------ datastax | 2013-10-16 00:00:00.000000+0000 | 4845ed97-14bd-11e5-8a40-8338255b7e33 | DataStax Studio datastax | 2013-04-16 00:00:00.000000+0000 | 5645f8bd-14bd-11e5-af1a-8638355b8e3a | What is DataStax Enterprise? cassandra | 2016-02-08 00:00:00.000000+0000 | 58c6816d-e21a-4114-8a0e-44add01f1dce | Me Lava Cassandra cassandra | 2016-02-08 00:00:00.000000+0000 | fbc4498e-2b2b-4a72-aff2-9f208f027f06 | Cassandra Write Test 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
(By changing consistency level i am able to see the inserted record)
Note : Still read was failing with No Host available Exception (for consistency level two which is meeting with Exercise outcome)
cqlsh:killrvideo> CONSISTENCY TWO; Consistency level set to TWO. cqlsh:killrvideo> select * from videos_by_tag ; NoHostAvailable: