Database Reference
In-Depth Information
If there's a problem with Cassandra, an hprofile will be created, as we can see in the following
output:
DEBUG 16:13:17,640 Disseminating load info ...
java.lang.OutOfMemoryError: Java heap space
Dumping heap to java_pid21279.hprof .. .
Heap dump file created [2766589 bytes in 0.032 secs]
ERROR 16:13:34,369 Fatal exception in thread Thread[pool-1-thread-1,5,main]
java.lang.OutOfMemoryError: Java heap space
at org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol
.java:296)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol
.java:203)
at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:1113)
The file will be created in <cassandra-home>, and you can open it like this:
$ jhat java_pid21279.hprof
The file will be analyzed, the server will be created, and you can open a browser to see what the
state of your objects were at the time of the crash.
Alternatively, you can create your own custom view by executing a query of the heap data in an
HTML form. Object Query Language (OQL) is a simple SQL-like syntax for querying the heap
dump file to find only objects that meet certain specified properties. The query in Figure 9-8 al-
lows us to filter on only objects that are in Cassandra's org.apache.cassandra.db package.
Search WWH ::




Custom Search