• Home
  • Testing
  • SAP
  • Web
  • Must Learn!
  • Big Data
  • Live Projects
  • Blog

Large organization such as Amazon, Facebook, etc. have a huge amounts of data to manage. So these organizations can’t store that huge amount of data on the single machine. This when they use databases like Cassandra with distributed architecture.

These organizations store that huge amount of data on multiples nodes. These nodes communicate with each other. For this purpose, Cassandra cluster is established.

  • Cluster is basically a group of nodes, so that nodes can communicate with each other easily.
  • Coordinator node is the node that communicates with replicas.

Partitioner

A partitioner determines how the data should be distributed on the cluster. Partitioner uses a hash function to distribute data on the cluster. It takes partition key to calculate the hash. That hash is called token. Data is distributed on the basis of this token.

In this tutorial, you will learn-

Here is the step by step guide for creating Cassandra cluster.

Prerequisites for Cassandra Cluster

There are following requirements for cluster setup.

  1. You should have multiple machines (Nodes).
  2. Nodes must be connected with each other on Local Area Network (LAN).
  3. Linux must be installed on each node.
  4. You should have Cassandra Enterprise edition.
  5. JDK must be installed on each machine.

Enterprise Edition Installation

On each machine, Cassandra enterprise edition needs to be installed. These are the steps for installation of Cassandra enterprise edition.

Step 1) On Linux terminal, run the Cassandra enterprise edition setup. The following page will be displayed.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

This page does not provide any necessary information. It just provides information about the Cassandra version. So pass this page and press next button.

Step 2) After pressing next button following page will be displayed.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

This page provides information about the packages and sub packages in the Cassandra that is going to be installed.

Below it will ask about the license. Check the checkbox 'I accept the agreement' and press next button.

Step 3) After pressing next button, you will see the following page.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

This page asks you about the installation options.

  1. First of all, it will ask for the installation directory. By default, it is installed in the home directory.
  2. Next, it asks about installation type, select Simple Install.
  3. Next, it asks about update system, check it 'no.'
  4. Next, it asks for default interface. There are two options, you can install on the localhost or select IP address. Select IP address for installation
  5. Press the next button.

Step 4) After pressing the next button the following page will be displayed.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

This page asks about the node setup.

  1. First, select Node type 'Casandra Node'.
  2. Next, in Ring Name, give your cluster name. Cluster name should be same for all the nodes in the same cluster.
  3. Next, select the seed. Seed is the node to which other non-seed nodes contacts.
  4. After providing this information press next button.

Step 5) After pressing next button, following page will be displayed.

This page asks for the IP address where you want to install datastax agent.

  1. Datastax agent is needed for ops center installation. Ops center is the monitoring tool where you can monitor all the nodes.
  2. After providing this information, press next button.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

Step 6) After pressing the next button the following page will be displayed.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

Now setup is ready to install. Press next button.

Step 7) After pressing next button, following page will be displayed.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

Setup will be started installing.

Step 8) After the installation, following page will be displayed. On the same page, you will see the check mark for the option which appears by default.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

Starting Cassandra Node

After installing Cassandra enterprise edition on each node, Start Cassandra server and follow the following steps.

Step 1) Go to the Cassandra enterprise installation directory, and type the below command

bin/dse cassandra

Cassandra Cluster Setup on Multiple  Nodes (Machines)

By executing this command, Cassandra server will be started. Here is the screenshot where Cassandra server is started automatically.

Cassandra Cluster Setup on Multiple  Nodes (Machines)

After almost one minute of executing the command, Cassandra server will be started. One by one start each node server. After starting all the nodes servers, your Cassandra cluster is ready to use.

Summary:

This tutorial explains why Cassandra cluster is required, what the prerequisites for creating Cassandra cluster are and how to create Cassandra Cluster. Also, this tutorial guides you how to access Cassandra enterprise server.

 

YOU MIGHT LIKE: