Book Image

Apache Cassandra Essentials

By : Nitin Padalia
Book Image

Apache Cassandra Essentials

By: Nitin Padalia

Overview of this book

Apache Cassandra Essentials takes you step-by-step from from the basics of installation to advanced installation options and database design techniques. It gives you all the information you need to effectively design a well distributed and high performance database. You’ll get to know about the steps that are performed by a Cassandra node when you execute a read/write query, which is essential to properly maintain of a Cassandra cluster and to debug any issues. Next, you’ll discover how to integrate a Cassandra driver in your applications and perform read/write operations. Finally, you’ll learn about the various tools provided by Cassandra for serviceability aspects such as logging, metrics, backup, and recovery.
Table of Contents (14 chapters)
Apache Cassandra Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The installation layout


The tarball installation layout is different from RPM or Debian packages. Let's see how they differ.

The directory layout in tarball installations

The following table shows the list of directories and their description:

Directory

Description

bin

This directory contains the startup scripts to launch the Cassandra server, the cqlsh prompt, and utility tools such as nodetool.

conf

This directory is the home of configuration files, including cassandra.yaml.

lib

This directory is Cassandra's Java dependency folder.

pylib

This directory contains Python libraries for cqlsh.

tools

Stress testing tools like cassandra-stress and other tools for example, sstable2json: which could be used to convert SSTables to JSON for debugging purposes. An SSTable or Sorted String Table is an immutable data file in disk, created for each Column Family. There could be zero or more SSTable per Column Family in every node of Cassandra cluster.

data

The Cassandra data directory will be created as soon as you start populating your Cassandra server. Its location is configured using the data_file_directories in the cassandra.yaml option.

logs

This is the default log directory. In older versions, it was /var/log/Cassandra.

The directory layout in package-based installation

The following table describes the installation layout if you use RPM or Debian packages:

Directory

Description

/var/lib/cassandra

This is the data directory.

/var/log/cassandra/

This is the log directory.

/var/run/Cassandra

This is the runtime file location, for example, the PID file.

/usr/share/Cassandra

This is the home of the include file cassandra-in.sh, which is used to set environment variables, such as CASSANDRA_HOME, CLASSPATH, and so on for Cassandra.

/usr/share/cassandra/lib

This is Cassandra's Java dependency folder; JAR files are placed here.

/usr/bin

This is the home of tools and utilities such as cqlsh, nodetool, and cassandra-stress.

/etc/cassandra

This is the home of the configuration.

/etc/init.d/

This contains the Cassandra startup scripts.

/etc/security/limits.d/

This is the file defining Cassandra user limits.