Database Reference
In-Depth Information
Most applications are capable of handling dropped READ requests, but dropped
MUTATION messages mean that data that should have been written isn't getting
written. Depending on the consistency level of the write in question, this could
mean the write didn't happen at all, or it could mean the write didn't happen on
this node. Also notice that the ReadStage and MutationStage lines have
multiple Active and Pending messages left to work on. The reason these mes-
sages are dropped is that Cassandra wants to do its best to keep up with the volume
of work that it is being given.
There are other such common log lines to watch for, which can be done via a
log monitor. One method for monitoring the logs programmatically using Nagios
will be discussed later in this chapter.
JMX and MBeans
Built into Cassandra and the JVM is the capability to use the JMX, or Java Man-
agement Extensions. In other words, using JMX gives you the capability to man-
age your servers remotely or check into settings programmatically, including the
memory, CPU, threads, Gossip, or any other part of the system that has been in-
strumented in JMX. Instrumentation is what enables the application to provide
application-specific information to be collected by external tools. JMX also gives
you the ability to control certain aspects of this information.
JConsole
MBeans, or Managed Beans, are a special type of JavaBean that makes a resource
inside the application or the JVM available externally. The standard tool that ships
with Java for managing the MBeans is JConsole.
The most common use case for accessing a Cassandra server is that the server
will be remote and you probably won't have console access to it. It is also highly
recommended that you run JConsole remotely as it is a heavy user of resources on
a machine and can steal those resources away from the Cassandra node. If this is
the case, you can use SSH tunneling to bring up JConsole. When you SSH, be sure
to use the -X switch to ensure that X11 forwarding is on. This is what enables you
to use JConsole over the network. After SSHing into the machine running Cas-
sandra and finding the JConsole binary, just execute it as you would any normal
binary. Assuming everything is configured correctly, you will get a JConsole login
window as shown in Figure 8.1 .
Search WWH ::




Custom Search