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

Advertisements
This entry was posted in Cassandra, Scala and tagged , , , , , , , . Bookmark the permalink.

17 Responses to Getting Started with Apache Cassandra

  1. Anurag Srivastava says:

    Reblogged this on Anurag Srivastava.

  2. shiv4nsh says:

    Reblogged this on Foobar and commented:
    Cassandra101

  3. Ankit Kumar Barthwal says:

    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”>akashsethi24.

  5. TechEbook says:

    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. Mary P says:

    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.

  7. DevBlog says:

    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.

  8. 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.

  9. Pingback: Cassandra Internals :- Writing Process – akashsethi24

  10. Pingback: Cassandra Internals: Writing Process | Knoldus

  11. jimenobaeznarvaez says:

    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 […]

  12. gumersindo says:

    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

  13. maxlcrepeau says:

    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

  14. 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

  15. 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

  16. Pingback: Getting Started With Phantom | Knoldus

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s