CASSANDRA Installation and Configuration 1 — Questions and Answers
Question 1: Which configuration file is the primary settings file for a Cassandra node?
- cassandra-env.sh
- cassandra.yaml (Correct answer)
- jvm.options
- logback.xml
Correct answer: cassandra.yaml
cassandra.yaml contains the core node configuration including cluster name, data directories, seeds, listen address, and replication settings.
Question 2: What is the role of 'seed nodes' in a Cassandra cluster?
- They hold the master copy of every partition
- They serve as initial contact points for new nodes joining the ring (Correct answer)
- They run the schema migration scripts
- They store the CommitLog only
Correct answer: They serve as initial contact points for new nodes joining the ring
Seed nodes are well-known contact points that new nodes use to learn the cluster topology through the gossip protocol during bootstrap.
Question 3: Which JVM garbage collector is recommended for Cassandra to minimize GC pause times?
- Serial GC
- Parallel GC
- G1GC or ZGC (Correct answer)
- CMS GC
Correct answer: G1GC or ZGC
G1GC (and increasingly ZGC for newer JDKs) is recommended for Cassandra to keep GC pauses short and avoid stop-the-world events that affect latency.
Question 4: What does the 'listen_address' parameter in cassandra.yaml define?
- The address Cassandra listens on for CQL client connections
- The IP address the node uses to communicate with other nodes in the cluster (Correct answer)
- The address of the seed node
- The Thrift RPC address
Correct answer: The IP address the node uses to communicate with other nodes in the cluster
listen_address is the IP that other Cassandra nodes use to reach this node for inter-node communication (gossip, streaming, repairs).
Question 5: What is the default native transport port used by Cassandra for CQL client connections?
- 7000
- 7001
- 7199
- 9042 (Correct answer)
Correct answer: 9042
Port 9042 is the default CQL native transport port that drivers and tools like cqlsh use to connect to Cassandra.
Question 6: Which Cassandra tool is used to inspect ring status, node state, and token distribution from the command line?
- cqlsh
- nodetool (Correct answer)
- sstableutil
- cassandra-stress
Correct answer: nodetool
nodetool is the primary administrative CLI for Cassandra, used to view ring status, trigger repairs, flush MemTables, and manage compaction.
Which configuration file is the primary settings file for a Cassandra node?