You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "sj.climber" <sj...@gmail.com> on 2012/06/07 01:49:32 UTC

NullPointerException when requesting compactionstats through nodetool

Hi,

I'm currently testing a 2-node 1.1.1 cluster with replication factor set to
2.  I have a column family C with the following definition:

create column family C with caching = 'keys_only' and key_validation_class =
'LongType' and compression_options = { sstable_compression:
SnappyCompressor, chunk_length_kb: 64 } and max_compaction_threshold=0;

max_compaction_threshold is set to 0 to disable automatic compression.

After streaming sstables through cassandra/bin/sstableloader, I force a
major compaction using "nodetool -h host1 compact MyKeyspace C".

Looking at the data file directory, it's clear that the major compaction is
progressing.  However, I am unable to get stats on the compaction.  More
specifically, "nodetool -h host1 compactionstats" yields the following
NullPointerException.

Exception in thread "main" java.lang.NullPointerException
	at
org.apache.cassandra.db.compaction.CompactionInfo.asMap(CompactionInfo.java:103)
	at
org.apache.cassandra.db.compaction.CompactionManager.getCompactions(CompactionManager.java:1115)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
	at
com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
	at
com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
	at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:65)
	at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:216)
	at
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)
	at
com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
	at
javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1404)
	at
javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
	at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
	at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360)
	at
javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:600)
	at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

Ideas?  Thanks in advance!

--
View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/NullPointerException-when-requesting-compactionstats-through-nodetool-tp7580370.html
Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.

Re: NullPointerException when requesting compactionstats through nodetool

Posted by Sylvain Lebresne <sy...@datastax.com>.
On Thu, Jun 7, 2012 at 1:49 AM, sj.climber <sj...@gmail.com> wrote:
> Looking at the data file directory, it's clear that the major compaction is
> progressing.  However, I am unable to get stats on the compaction.  More
> specifically, "nodetool -h host1 compactionstats" yields the following
> NullPointerException.

Obviously, that shouldn't happen so that's a bug. Would you mind
opening a ticket on https://issues.apache.org/jira/browse/CASSANDRA
with that stack trace.

Thanks,
Sylvain

>
> Exception in thread "main" java.lang.NullPointerException
>        at
> org.apache.cassandra.db.compaction.CompactionInfo.asMap(CompactionInfo.java:103)
>        at
> org.apache.cassandra.db.compaction.CompactionManager.getCompactions(CompactionManager.java:1115)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)
>        at
> com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)
>        at
> com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)
>        at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:65)
>        at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:216)
>        at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:666)
>        at
> com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
>        at
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1404)
>        at
> javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72)
>        at
> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265)
>        at
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360)
>        at
> javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:600)
>        at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
>        at sun.rmi.transport.Transport$1.run(Transport.java:159)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>        at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>        at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:662)
>
> Ideas?  Thanks in advance!
>
> --
> View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/NullPointerException-when-requesting-compactionstats-through-nodetool-tp7580370.html
> Sent from the cassandra-user@incubator.apache.org mailing list archive at Nabble.com.