Published by expire0
Posted on January 26, 2019
Cassandra is great for storing unknown type and amounts of data. One of the key benefits I like it. When you update a row and the primary matches. It will only update that row instead of adding a new row. With Mysql you had to set the unique option on the column.
Git repo https://gitbox.apache.org/repos/asf?p=cassandra.git
Install steps
log path /var/log/cassandra/
Config path /etc/cassandra/default.conf/
Edit /etc/cassandra/default.conf/cassandra.yaml
if you receive a error when trying to use nodetool. You will need to edit /etc/cassandra/default.conf/cassandra-env.sh and change JVM_OPTS=”$JVM_OPTS -Djava.rmi.server.hostname=<main IP>”
Example commands
nodetool status – show the status of the nodes in the cluster
nodetool drain – dumps the memory from memtable to the local disk.
creating a new keyspace – create KEYSPACE IF NOT EXISTS openkb WITH replication = {‘class’: ‘SimpleStrategy’, ‘replication_factor’: 1};
creating a new table – create TABLE IF NOT EXISTS name text, email text, with (primary key (name));
https://stackoverflow.com/questions/11681522/wildcard-search-in-cassandra-database
https://stackoverflow.com/questions/29121904/cassandra-cqlsh-connection-refused