Skip to content

Cassandra Script Files

JoeWinter edited this page Jan 19, 2015 · 1 revision

[Table of Contents](https://github.com/dell-oss/Doradus/wiki/Doradus Administration: Table-of-Contents) | [Previous](https://github.com/dell-oss/Doradus/wiki/Cassandra Configuration and Operation) | [Next](https://github.com/dell-oss/Doradus/wiki/Cassandra Configuration Files)
[Cassandra Configuration and Operation](https://github.com/dell-oss/Doradus/wiki/Cassandra Configuration and Operation): Cassandra Script Files


Within the folder {cassandra_home}/bin, the following are the key scripts that can be used to launch Cassandra and various tools:

  • cassandra.bat: This is the script file bundled with Cassandra to launch it from a command console.

  • cassandra-cli.bat: This script file runs the Cassandra command line interface (CLI) tool. It can be used to perform low-level queries and to modify certain Cassandra schema options.

  • nodetool.bat: This script launches the Cassandra nodetool utility, which can perform various Cassandra monitoring and operational commands: determining cluster status, forcing compaction, rebuilding a node, etc.

The bin folder contains .bat files for other tools as well. Except for cassandra.bat, most of the script files can run with the parameter "-?" to get help information.

Setting Cassandra Runtime Memory

By default, Cassandra is set to use only 1GB of memory. This is OK for testing on a developer workstation, but for production work, 8GB to 16GB of memory is recommended. This is controlled by the -Xms and -Xmx parameters. Within the {cassandra_home}/bin/cassandra.bat, these values are explicitly defined and can be modified as shown below:

set JAVA_OPTS=^
 -Xms8G^
 -Xmx8G^
 ...

For use by Doradus, 8GB is the recommended minimum memory. If the machine has 32GB of physical memory or more, 16GB is the recommended memory allocated to Cassandra.

Disabling Assertions

The Java runtime option -ea (or -enableassertions) is used to enable diagnostic "assert" statements in Java applications. It is useful in development/debugging environments since additional internal checking is performed, but it has a small performance cost. It should be disabled in production environments to eliminate the performance cost. This can be done by simply removing the -ea option in JVM options or replacing it with -da (or -disableassertions). In both the Cassandra script files {doradus_home}/bin/doradus-cassandra.bat and {cassandra_home}/bin/cassandra.bat, assertions are declared in the set JAVA_OPTS statement as shown below:

set JAVA_OPTS=-ea^
...
Clone this wiki locally