Performing an operation

Performing an operation is also possible through JMXTerm. For example, you can invoke the stopGossiping operation under the org.apache.Cassandra.db package using the following run command. This stops gossiping to other nodes. Which is your favorite operation on Cassandra?

run -b org.apache.cassandra.db:type=StorageService stopGossiping

The output of the preceding command is as follows:

Figure 7.8: Performing the stopGossiping operation through JMXTerm

Instead of the interactive CLI, you can run a list of commands using a file, as follows:

echo -e "open <IP>:7199\nrun -b org.apache.cassandra.db:type=StorageService forceTerminateAllRepairSessions\nclose ...

Get Mastering Apache Cassandra 3.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.