Skip to content

Cassandra Basics

Create keyspace

Bash Session
CREATE KEYSPACE IF NOT EXISTS somename WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1}  AND durable_writes = true;

Drop

Bash Session
DROP KEYSPACE some_name;

Tips:

In case you change cluster name the following is needed

Bash Session
cqlsh> UPDATE system.local SET cluster_name = 'test' where key='local';

flush the sstables to persist the update.

txt bash $ ./nodetool flushtxt

Back to top