What You’ll Learn:Learn about the three main configuration files for Apache Cassandra, what they control, and how to modify them.

 

 

Lets take a look at the three main configuration files for Apache Cassandra. To view the configuration files, from the root console type the following:

# cd /etc/cassandra

# ls

 

Now we will look at each in more detail

  • cassandra.yaml

  • cassandra-env.sh

  • log4j-server.properties

 

The cassandra.yaml file is the main configuration file for Cassandra. After changing properties in this file, you must restart your instance for the changes to take effect. In this file, you can find properties to tune performance and system resource utilization (memory, disk I/O, CPU, etc.) for reads and writes. It also contains node and cluster initialization properties.

Review this file with the command:

# more cassandra.yaml

or make changes with your favorite text editor.

 

The cassandra-env.sh file in part controls the environment settings for Cassandra. It has heap sizing options(MAX_HEAP_SIZE, HEAP_NEWSIZE) and JMX options which can be monitored or manipulated, like nodetool, an JMX-compliment management tool. By default, JMX listens on port 7199 without authentication.

 

If you are interested in configuring logging, you should look at the the log4j-server.properties file. In some situations, the output from nodetool utility is not enough to diagnose an issue. If you find that you need more information on runtime behavior of your instance, you can increase the logging levels to get more diagnostic information on specific portions of the system.

 

Next