0
votes

cqlsh> CREATE KEYSPACE twitter WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 };

cqlsh> CREATE TABLE twitter.user ( name text, attrs map, PRIMARY KEY (name) );

cqlsh> INSERT INTO twitter.user (name,attrs) VALUES ('bob',{'email':'[email protected]','firstname':'bob'});

enter image description here

1
you have to PUT the index before doing the PUT for mapping.ugosan

1 Answers

0
votes

you are using the wrong class at the time to create the keyspace it should be 'NetworkTopologyStrategy'

CREATE KEYSPACE IF NOT EXISTS twitter WITH replication={ 'class':'NetworkTopologyStrategy', 'dc1':'1' };

And chenge the name of the datacenter ('dc1') chek the name using nodetool status. It is case sensitive!!!

In my case I solved the problem using DC1 insted of dc1