index_not_found_exeception. elassandra

120 views Asked by At

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

There are 1 answers

0
isaura almar On

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