0

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
    Sep 18, 2017 at 19:35

1 Answer 1

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.