Getting Started with Apache Cassandra

Why Apache Cassandra?

Apache Cassandra is a free, open source, distributed data storage system that differs sharply from relational database management systems.
Cassandra has become so popular because of its outstanding technical features. It is durable, seamlessly scalable, and tuneably consistent.
It performs blazingly fast writes, can store hundreds of terabytes of data, and is decentralized and symmetrical so there’s no single point of failure.
It is highly available and offers a schema-free data model.

Installation:

Cassandra is available for download from the Web here. Just click the link on the home page to download the latest release version and Unzip the downloaded cassandra  to a local directory.

Starting the Server:

To start the Cassandra server on any OS, open a command prompt or terminal window, navigate to the /bin where you unpacked Cassandra,
and run the following command to start your server.
In a clean installation, you should see some log statements like this:

$ bin/cassandra -f

Congratulations! Now your Cassandra server should be up and running with a new single node cluster called Test Cluster listening on port 9160.

Running the Command-Line Client Interface:
Now that you have a Cassandra installation up and running, let’s give it a quick try to make sure everything is set up properly
The Cassandra client will start:

$ bin/cqlsh

Creating a Keyspace :

A Cassandra keyspace is sort of like a relational database.
Let’s create our own keyspace so we have something to write data to:

CREATE KEYSPACE <keyspacename> WITH replication = {'class':'<strategyname>', 'replication_factor' : <no_of_replication>};

where replication option is to specify the Replica Placement strategy and the number of replicas wanted. Strategies for replication can be one of the following:

  • Simple Strategy – Specifies a simple replication factor for the cluster.
  • NetworkTopologyStrategy – Specifies how many replicas you want in each data center.

After you have created your own keyspace, you can switch to it in the shell by typing:

$ use keyspacename;

References: Cassandra Definitive Guide

KNOLDUS-advt-sticker

Written by 

Charmy is a Software Consultant having experience of more than 1.5 years. She is familiar with Object Oriented Programming Paradigms and has familiarity with Technical languages such as Scala, Lagom, Java, Apache Solr, Apache Spark, Apache Kafka, Apigee. She is always eager to learn new concepts in order to expand her horizon. Her hobbies include playing guitar and Sketching.

17 thoughts on “Getting Started with Apache Cassandra

  1. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>akashsethi24.

  2. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 nice explanation of basics to start with Cassandra, thanks for sharing.

  3. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 nice explanation of basics to start with Cassandra, thanks for sharing.

  4. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 nice explanation of basics to start with Cassandra, thanks for sharing.

  5. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 nice explanation of basics to start with Cassandra, thanks for sharing.

  6. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 To read more about Cassandra you can refer to this […] com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101

  7. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 To read more about Cassandra you can refer to this […] com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101

  8. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 To read more about Cassandra you can refer to this […] com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101

  9. com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101 To read more about Cassandra you can refer to this […] com/2017/04/18/getting-started-with-apache-cassandra/” rel=”nofollow”>Foobar and commented:
    Cassandra101

Leave a Reply

%d bloggers like this: