Introduction
Cassandra
handles large amount of data (Big Data) across many commodity
servers providing high availability with no single point of failure.
Key features of Apache Cassandra
1.) Decentralized so every node in the same cluster has the same role, therefore no single point of failure.
2.) Supports replication and multi data center replication.
3.) Scalability.
4.) Cassandra is highly available and distributed.
5.) High Performance.
6.) Tunable consistency
7.) NoSQL and Open source
Setup Apache Cassandra 2.0 on Ubuntu 14.04
1.First check which version of Java is installed by running the following command in a terminal in ubuntu 14.04 .(Oracle JRE is recommended.)
java -version
2.Add the DataStax Community repository to the aptitude repository source list file (/etc/apt/sources.list).
deb http://debian.datastax.com/community stable main
3.Install curl in ubuntu 14.04 using,
sudo apt-get curl
4.Add the DataStax repository key
curl -L http://debian.datastax.com/debian/repo_key | sudo apt-key add -
5.Update ubutntu 14.04
sudo apt-get update
6.Install datastax community package
sudo apt-get install dsc20
Simple Cassandra Tutorial (Cassandra Query Language)
create
keyspace ScoreCard with replication = {'class':'SimpleStrategy',
'replication_factor':1};
select * from system.schema_keyspaces;
use scorecard;
create table teamscorecard
(teamname varchar ,teamid int , releasetimeuuid timeuuid,releaseid
int ,actualid double ,actualgrowth double , PRIMARY KEY
(teamname,teamid));
insert into teamscorecard
(teamname, teamid , releasetimeuuid , releaseid , actualid ,
actualgrowth ) VALUES ('HE Portal', 100,now(),20,3.0,4.0);
select * from teamscorecard;