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':'bob@gmail.com','firstname':'bob'});

enter image description here

Sachin
  • 71
  • 2
  • 14

1 Answers1

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