The cassandra utility starts the Cassandra Java server process.
Cassandra requires the following environment variables to be set:
For convenience, Cassandra uses an include file, cassandra.in.sh, to source these environment variables. It will check the following locations for this file:
Cassandra also uses the Java options set in $CASSANDRA_CONF/cassandra-env.sh. If you want to pass additional options to the Java virtual machine, such as maximum and minimum heap size, edit the options in that file rather than setting JVM_OPTS in the environment.
Passes in one of the following startup parameters:
Parameter Description access.properties=<filename> The file location of the access.properties file. cassandra-pidfile=<filename> Log the Cassandra server process ID in the named file. Useful for stopping Cassandra by killing its PID. cassandra.config=<directory> The directory location of the Cassandra configuration files. cassandra.initial_token=<token> Sets the initial partitioner token for a node the first time the node is started. cassandra.join_ring=<true|false> Set to false to start Cassandra on a node but not have the node join the cluster.
Set to false to clear all gossip state for the node on restart. Use if youhave changed node information in cassandra.yaml (such as listen_address).
Set to true to reset local counter info on a node. Used to recover from data loss to a counter column family. First remove all SSTables for counter column families on the node, then restart the node with -Dcassandra.renew_counter_id=true, then run nodetool repair once the node is up again. cassandra.replace_token=<token> To replace a node that has died, restart a new node in its place and use this parameter to pass in the token that the new node is assuming. The new node must not have any data in its data directory and the token passed must already be a token that is part of the ring.
cassandra.framed cassandra.host cassandra.port=<port> cassandra.rpc_port=<port> cassandra.start_rpc=<true|false> cassandra.storage_port=<port> corrupt-sstable-root legacy-sstable-root mx4jaddress mx4jport passwd.mode passwd.properties=<file>
Start Cassandra on a node and log its PID to a file:
cassandra -p ./cassandra.pid
Clear gossip state when starting a node. This is useful if the node has changed its configuration, such as its listen IP address:
Start Cassandra on a node in stand-alone mode (do not join the cluster configured in the cassandra.yaml file):