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':'bob@gmail.com','firstname':'bob'});
Asked
Active
Viewed 114 times
0

Sachin
- 71
- 2
- 14
-
you have to PUT the index before doing the PUT for mapping. – ugosan Sep 18 '17 at 19:35
1 Answers
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

isaura almar
- 406
- 5
- 11