A Personalized Guide To Installing Cassandra On My Local Computer
A Personalized Guide To Installing Cassandra On My Local Computer
Installing Cassandra
There were several steps I had to follow in order to get cassandra running on my system.
I came across them out one by one, slowly— and it took me ∼3 days to figure out the route.
Well, version 11 is fine. But if you get 9 or 10 , sorry— you will need. . .
3 /home/partha$ sudo apt−get install openjdk −11− j d k openjdk −11− j r e
followed by. . .
4 /home/partha$ sudo apt−get update
and finally
8 /home/partha/cassandra$ sudo apt−get install cassandra
1
To check, just type on your termainal . . .
9 /home/partha/cassandra$ service cassandra status
Creating a keyspace
12 cqlsh> CREATE KEYSPACE cxsphere_development WITH replication = {’class’: ’
SimpleStrategy’, ’replication_factor’: ’1’} AND durable_writes = true;
13
14 cqlsh> DESCRIBE keyspaces;
15
16 system_virtual_schema system_schema system_views system_distributed
17 cxsphere_development system_auth system system_traces
18
19 cqlsh> CREATE TABLE cxsphere_development.customer_identity(app_id text,
user_id int, source text, section text, category text, data map<text,
text>, primary key(app_id, user_id, source, section, category));
20
21 cqlsh> DESCRIBE tables;
22
23 Keyspace system_virtual_schema
24 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
25 keyspaces "columns" tables
26
27 Keyspace cxsphere_development
28 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−
29 customer_identity
30
31 Keyspace system_schema
32 −−−−−−−−−−−−−−−−−−−−−−
33 ... ... ...
2
Once tables or keyspaces are created. . .
We need to load data (say, from a csv file), and read data from the tables for our varied
obscure purposes !