In this article, we are going to discuss the tools of Apache Cassandra which help to perform in various aspects of tasks such that the status of the node, the status of the ring, back up and restore data, etc.
- The CQL shell (cqlsh) –
This is a tool for Cassandra Query Language which supports Cassandra. cqlsh is a command-line shell for interacting with Cassandra through CQL (the Cassandra Query Language). with the help of the cql command, we can read and write data with the help of the cql query.
By default, CQL installed in bin/ directory alongside the Cassandra executable. In Cassandra, cqlsh utilizes the Python native protocol driver and connects to the single node specified on the command line.
Below is the screenshot of cqlsh to connect with cqlsh shell.
Figure – Connect with cqlsh shell
- Nodetool –
Nodetool is a very useful tool in Apache Cassandra. In Cassandra, nodetool is the utility for cqlsh, and with the help of nodetool, we can perform many actions such that nodetool describecluster this command will Print the name, snitch, partitioner and schema version of a cluster. Below given is the screenshot of the nodetool tool in which will see that how we can connect with the nodetool tool. It is also by default installed in the bin/ directory.
Example – nodetool status, nodetool describecluster, etc. are the commands of nodetool.
Figure – Nodetool describecluster
- SSTable Tools –
In Cassandra, SSTable Tools utility has many tools like sstabledump, sstableloader, sstableutil, etc. If the user wants to dump the contents of a given SSTable to standard output in JSON format then we will use the sstabledump command. You must supply exactly one sstable. In the case of SSTable Tools, Cassandra’s service must be stopped while executing this tool is executed, or unexpected results will occur.
SSTable tools script does not verify that Cassandra is stopped.
Example – If the user wants to dump the contents in JSON format then we can use this command.
sstabledump <options> <sstable file path>
- Cassandra Stress –
In Apache Cassandra, Cassandra-stress is a tool for benchmarking and load testing a Cassandra cluster. In Apache Cassandra, to benchmark their data model, Cassandra-stress supports testing arbitrary CQL tables and queries and allows users to benchmark their data model.
cassandra-stress <command> [options]
- Cassandra as a Service (DataStax Astra) –
It is one of the best tools for Cassandra, DataStax providing Cassandra as a service and gives 10 GB free on cloud and you can deploy your cluster databases on AWS and GCP.
They are dedicated deployed services on the cloud such that AWS, GCP, etc. It is a GUI based tool, you can create your own notebook for self-explanatory and also, you can directly execute cqlsh query either in a shell or in a notebook. Application connectivity with Cassandra is easy through drivers such that Java driver, python driver, Java Script driver, etc.
Figure – DataStax Astra Databases
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.