Difficulty: Easy
Estimated Time: 15 minutes

Virtual tables, introduced in Apache Cassandra™ 4.0, allow you to expose metrics and properties of the node with the same interface as ordinary tables. This allows for a much easier way to observe the state and the health of the cluster without leaving the CQL protocol.

In this scenario you will learn:

  • how to look at virtual tables and their contents
  • what you cannot do with virtual tables
  • what to expect if you change node settings

Virtual Tables

Step 1 of 8

Setup

Note: wait until you see the message "Cassandra has started" in the terminal before proceeding.

First, verify that Cassandra is properly installed on this machine and is running as a system service. To do so, you can ask your operating system's daemon manager:

systemctl status cassandra --no-pager

Look for a green circle and Active (running) in the output.

Even better, you can use nodetool, Cassandra's utility for node administration:

nodetool status

The output should show that the current node (which forms a cluster by itself) is in a status "UN" (meaning Up and Normal).

Make sure Cassandra is completely started before proceeding.

Please run the following to initialize the other terminals of this scenario:

echo Initializing terminal 2
echo Initializing terminal 3

You will use cqlsh several times during this exercise. So let us open a cqlsh console and keep it running on the second terminal:

cqlsh
Terminal
CQL console
Client console