Database Reference
In-Depth Information
These statistics come in very handy if you are concerned that performance is degrading. But they
also are great for showing how fast Cassandra can be. For example, on my eight-core machine,
I've recorded write latency at 92 microseconds for simple values in a small database.
This set of MBeans also makes data regarding the Compaction Manager available, including the
total bytes that are in the process of being compacted and the total bytes that have been com-
pacted.
org.apache.cassandra.gms
This package has one MBean with three operations: you can dump arrival times or get and set
the conviction threshold, which by default is 8.
org.apache.cassandra.service
The service package offers two beans: StorageService and StreamingService . Because
these classes are central to Cassandra's operations, they expose the greatest number of operations
and give you considerable external control. Let's take a moment to survey some of the key ele-
ments.
StorageService
Because Cassandra is a database, it's essentially a very sophisticated storage program; therefore,
one of the first places you'll want to look when you encounter problems is the StorageService
MBean. This allows you to inspect your OperationMode , which reports normal if everything is
going smoothly (other possible states are leaving , joining , decommissioned , and client ).
You can also view the current set of live nodes, as well as the set of unreachable nodes in the
cluster. If any nodes are unreachable, Cassandra will tell you their IP addresses in the Unreach-
ableNodes attribute. But there are many other standard maintenance operations that this bean
affords you, and understanding the operations available here is important to keeping your cluster
in good health. I encourage you to check out the bean for yourself, of course, and here I highlight
some of the key maintenance operations.
If you want to change Cassandra's log level at runtime without interrupting service (as we saw
earlier in the general example), you can invoke the setLog4jLevel(String classQualifi-
er, String level) method. For example, say that you have set Cassandra's log level to debug
because you're troubleshooting an issue. You can use some of the methods described here to try
to help fix your problem, then you might want to change the log level to something less trying
on the system. To do this, navigate to the StorageService MBean in JConsole. We'll change
the value for a particularly chatty class: the LoadDisseminator . The first parameter to this op-
eration is the name of the class you want to set the log level for, and the second parameter is the
Search WWH ::




Custom Search