Search This Blog

Showing posts with label cassandra. Show all posts
Showing posts with label cassandra. Show all posts

06 September, 2015

Cassandra cqlsh queries

Below are the commands useful for querying the cassandra database .
These are executed by logging into the Cassandra command line interface(CLI), CQLSH

1) showing the keyspaces(or databases )

describe keyspaces;

2)
Showing Tables in the keyspace(or database)

2.1. use <keyspace_name>;

2.2 describe tables;  this will show the tables in the keyspace(database)

3) Creating Index to an Exiting table with column

 CREATE INDEX tripid_idx ON table_4(tripid);


4) To show TABLE info using cqlsh
        DESC TABLE table_1 ;

20 June, 2015

installing datastax cassandra cpp-driver package for Ubuntu



1) Install cassandra cpp-driver from
http://downloads.datastax.com/cpp-driver/ubuntu/

select the ubuntu version properly

For Ubuntu 12.04

sudo wget http://downloads.datastax.com/cpp-driver/ubuntu/12.04/cassandra-cpp-driver_2.0.1-1_amd64.deb
sudo wget http://downloads.datastax.com/cpp-driver/ubuntu/12.04/libuv_1.4.2-1_amd64.deb

For Ubuntu 14.04

sudo wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/cassandra-cpp-driver_2.0.1-1_amd64.deb
sudo wget http://downloads.datastax.com/cpp-driver/ubuntu/14.04/libuv_1.4.2-1_amd64.deb


sudo dpkg -i libuv_1.4.2-1_amd64.deb
sudo dpkg -i cassandra-cpp-driver_2.0.1-1_amd64.deb

done

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...