cassandra-env.sh file
Use cassandra-env.sh for JVM settings that depend on the host at
startup, such as heap sizing or startup flags that you only want to set
for one machine. If the setting is static, use the jvm-* files
instead.
The risk with this file is not syntax. It is startup behavior. A bad choice can keep a node out of the ring, change how bootstrap behaves, or make gossip state look cleaner than it really is.
The examples below are the ones operators usually need to think about.
cassandra.auto_bootstrap=false
Use this only when you intentionally want a node to start without joining the ring yet. Leaving it disabled on a node that should join the cluster will prevent normal bootstrap.
cassandra.available_processors=<number_of_processors>
In a multi-instance deployment, multiple Cassandra instances will each assume they can use all CPUs. Use this setting to cap the processors visible to one instance.
cassandra.boot_without_jna=true
If JNA fails to initialize, Cassandra can fail to boot. Use this only if you accept the reduced JNA-backed functionality.
cassandra.config=<directory>
The directory location of the cassandra.yaml file. The default
location depends on the installation type.
cassandra.ignore_dynamic_snitch_severity=true|false
Setting this property to true causes the dynamic snitch to ignore the severity indicator from gossip when scoring nodes. Use it only if you understand the trade-off: it can make startup behavior more stable, but it also hides severity from replica selection.
Default: false
cassandra.initial_token=<token>
Use this only when virtual nodes (vnodes) are not used. A bad initial token can skew the ring and shift too much data onto one node.
Default: disabled
cassandra.join_ring=true|false
Set to false if you want to start Cassandra without joining the ring yet. This is useful during maintenance, but a node left in this state will not serve data until you join it manually.
Default: true
cassandra.load_ring_state=true|false
Set to false if you want Cassandra to forget ring state on restart. That can help a node recover from stale gossip, but it also means the node must rebuild its view of the cluster.
Default: true
cassandra.partitioner=<partitioner>
Set the partitioner.
Default: org.apache.cassandra.dht.Murmur3Partitioner
cassandra.prepared_statements_cache_size_in_bytes=<cache_size>
Set the cache size for prepared statements.
cassandra.replace_address=<listen_address of dead node>|<broadcast_address of dead node>
To replace a node that has died, restart a new node in its place
specifying the listen_address or broadcast_address that the new node
is assuming. The new node must not have any data in its data directory,
the same state as before bootstrapping. Note: The broadcast_address
defaults to the listen_address except when using the
Ec2MultiRegionSnitch.
cassandra.ring_delay_ms=<number_of_ms>
Defines the amount of time a node waits to hear from other nodes before formally joining the ring.
Default: 1000ms
cassandra.native_transport_port=<port>
Set the port on which the CQL native transport listens for clients.
Default: 9042
cassandra.rpc_port=<port>
Set the port for the Thrift RPC service, which is used for client connections.
Default: 9160
cassandra.start_native_transport=true|false
Enable or disable the native transport server. See
start_native_transport in cassandra.yaml.
Default: true
cassandra.triggers_dir=<directory>
Set the default location for the trigger JARs.
Default: conf/triggers