Configuring Cassandra
Cassandra configuration files location varies, depending on the type of installation:
/etc/cassandradirectoryconfdirectory within the tarball install location/etc/cassandradirectorycassandra.yaml, is sufficient to explore a simple single-nodecluster. However, anything beyond running a single-node cluster locally requires additional configuration to various Cassandra configuration files. Some examples that require non-default configuration are deploying a multi-node cluster or using clients that are not running on a cluster node.cassandra.yaml: the main configuration file for Cassandracassandra-env.sh: environment variables can be setcassandra-rackdc.propertiesORcassandra-topology.properties: set rack and datacenter information for a clusterlogback.xml: logging configuration including logging levelsjvm-*: a number of JVM configuration files for both the server and clientscommitlog_archiving.properties: set archiving parameters for thecommitlog./conf:cqlshrc.sample: how the CQL shell, cqlsh, can be configuredMain runtime properties
cassandra.yamlfile. At a minimum you should consider setting the following properties:cluster_name: Set the name of your cluster.seeds: A comma separated list of the IP addresses of your clusterseed nodes.storage_port: Check that you don’t have the default port of 7000 blocked by a firewall.listen_address: Thelisten addressis the IP address of a node that allows it to communicate with other nodes in the cluster. Set to localhost by default. Alternatively, you can setlisten_interfaceto tell Cassandra which interface to use, and consecutively which address to use. Set one property, not both.native_transport_port: Check that you don’t have the default port of 9042 blocked by a firewall, so that clients like cqlsh can communicate with Cassandra on this port.Changing the location of directories
The following yaml properties control the location of directories:data_file_directories: One or more directories where data files, likeSSTablesare located.commitlog_directory: The directory where commitlog files are located.saved_caches_directory: The directory where saved caches are located.hints_directory: The directory wherehintsare located. For performance reasons, if you have multiple disks, consider putting commitlog and data files on different disks.Environment variables
cassandra-env.sh. You can add any additional JVM command line argument to theJVM_OPTSenvironment variable; when Cassandra starts, these arguments will be passed to the JVM.Logging
The default logger is logback. By default it will log:- INFO level in
system.log - DEBUG level in
debug.loglogback.xmlor by running the nodetool setlogginglevel command.
