Andre Schütz - Learn. Think. Reflect - Tech developer
Basic Cassandra commands

Basic Cassandra commands

The following commands and shell options are used with Cassandra 2.2 and 3.x.

Increase Request Timeout for local database connection

The following option increases the request timeout for the current session.

./cassandra/bin/cqlsh --request-timeout=3600

Clear all former snapshots

./cassandra/bin/nodetool clearsnapshot

Increase Heap size for local session (mostly development)

MAX_HEAP_SIZE=8g HEAP_NEWSIZE=2g ./cassandra/bin/cassandra -f

Starting and connecting local cassandra instance

# Startup
./cassandra/bin/cassandra -f

# Connect
./bin/cqlsh localhost

Show all Keysapces

DESCRIBE KEYSPACES;

Show all tables of a Keyspace

DESCRIBE KEYSPACE keyspaceName;

Set a Keyspace as current working space

USE keyspaceName;

Leave a Reply