CASSANDRA Operations and Administration 2 — Questions and Answers
Question 1: What is the 'sstableloader' tool used for in Cassandra?
- Compacting SSTables offline
- Bulk-loading existing SSTable files into a running Cassandra cluster (Correct answer)
- Converting SSTables from one version format to another
- Validating SSTable checksums
Correct answer: Bulk-loading existing SSTable files into a running Cassandra cluster
sstableloader streams one or more SSTable files into a live cluster, automatically handling token distribution so data lands on the correct nodes.
Question 2: What Cassandra tool can be used to inspect the contents of an SSTable file without starting a Cassandra node?
- nodetool inspect
- sstabledump (Correct answer)
- cqlsh --offline
- cassandra-stress --read
Correct answer: sstabledump
sstabledump serializes the contents of an SSTable to JSON format so you can inspect partition data, tombstones, and metadata without running a live node.
Question 3: In a Cassandra cluster, what does 'bootstrap' refer to?
- Starting the Cassandra daemon for the first time
- The process by which a new node joins the ring and streams its assigned data from existing nodes (Correct answer)
- The initial schema creation when a keyspace is first defined
- Restarting all nodes after a cluster-wide upgrade
Correct answer: The process by which a new node joins the ring and streams its assigned data from existing nodes
During bootstrap, a new node contacts the seed nodes, receives its token assignments, and streams the corresponding data from current owners before becoming fully operational.
Question 4: What does the 'nodetool assassinate' command do?
- Permanently removes a node's data from all replicas
- Forcefully removes a node that is stuck in a leaving/joining state from the ring (Correct answer)
- Kills the Cassandra process immediately without draining
- Deletes all tombstones on a target node
Correct answer: Forcefully removes a node that is stuck in a leaving/joining state from the ring
nodetool assassinate is used as a last resort to forcefully remove a node that is stuck in the ring (e.g., in LEAVING state) when normal decommission has failed.
Question 5: What is the purpose of running 'nodetool upgradesstables' after a Cassandra version upgrade?
- Recompiles CQL queries for the new version
- Rewrites all SSTables into the current version's format to take advantage of format improvements (Correct answer)
- Applies schema migrations to existing data
- Rebuilds secondary indexes with the new indexing engine
Correct answer: Rewrites all SSTables into the current version's format to take advantage of format improvements
upgradesstables rewrites SSTables into the latest SSTable format version, enabling new compression, indexing, and performance features introduced in the upgraded version.
Question 6: What does setting 'auto_bootstrap: false' in cassandra.yaml do?
- Disables automatic schema migrations
- Prevents the node from streaming data when joining the ring, used when building a new cluster from scratch (Correct answer)
- Disables automatic MemTable flushing
- Prevents the node from accepting writes until repair completes
Correct answer: Prevents the node from streaming data when joining the ring, used when building a new cluster from scratch
Setting auto_bootstrap to false tells Cassandra not to stream data when the node joins, which is the correct behavior when forming a brand new cluster where no existing data needs to be replicated.
What is the 'sstableloader' tool used for in Cassandra?