I wrote a small JMX client to invoke getNaturalEndpoints. It works fine at my test environment, but throws NPE for keyspace we will use for our application (both 0.7.5). Does anyone know quick resolution of that before I setting up cassandra on eclipse to inspect what happens :)
thanks Exception in thread "main" javax.management.RuntimeMBeanException: java.lang.NullPointerException at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:877) [snip] at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993) at my.test.getNaturalEndpoints.main(getNaturalEndpoints.java:32) Caused by: java.lang.NullPointerException at org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:266) at org.apache.cassandra.db.Table.<init>(Table.java:212) at org.apache.cassandra.db.Table.open(Table.java:106) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1497) [snip] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) 2011/5/11 Jonathan Ellis <jbel...@gmail.com>: > Thanks! > > On Wed, May 11, 2011 at 10:20 AM, Maki Watanabe <watanabe.m...@gmail.com> > wrote: >> Add a new faq: >> http://wiki.apache.org/cassandra/FAQ#jconsole_array_arg >> >> 2011/5/11 Nick Bailey <n...@datastax.com>: >>> Yes. >>> >>> On Wed, May 11, 2011 at 8:25 AM, Maki Watanabe <watanabe.m...@gmail.com> >>> wrote: >>>> Thanks, >>>> >>>> So my options are: >>>> 1. Write a thrift client code to call describe_ring with hashed key >>>> or >>>> 2. Write a JMX client code to call getNaturalEndpoints >>>> >>>> right? >>>> >>>> 2011/5/11 Nick Bailey <n...@datastax.com>: >>>>> As far as I know you can not call getNaturalEndpoints from jconsole >>>>> because it takes a byte array as a parameter and jconsole doesn't >>>>> provide a way for inputting a byte array. You might be able to use the >>>>> thrift call 'describe_ring' to do what you want though. You will have >>>>> to manually hash your key to see what range it falls in however. >>>>> >>>>> On Wed, May 11, 2011 at 6:14 AM, Maki Watanabe <watanabe.m...@gmail.com> >>>>> wrote: >>>>>> Hello, >>>>>> It's a question on jconsole rather than cassandra, how can I invoke >>>>>> getNaturalEndpoints with jconsole? >>>>>> >>>>>> org.apache.cassandra.service.StorageService.Operations.getNaturalEndpoints >>>>>> >>>>>> I want to run this method to find nodes which are responsible to store >>>>>> data for specific row key. >>>>>> I can find this method on jconsole but I can't invoke it because the >>>>>> button is gray out and doesn't accept >>>>>> click. >>>>>> >>>>>> Thanks, >>>>>> -- >>>>>> maki >>>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> w3m >>>> >>> >> >> >> >> -- >> w3m >> > > > > -- > Jonathan Ellis > Project Chair, Apache Cassandra > co-founder of DataStax, the source for professional Cassandra support > http://www.datastax.com > -- w3m
Exception in thread "main" javax.management.RuntimeMBeanException: java.lang.NullPointerException at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:877) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:890) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:859) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1450) at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:90) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1285) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1383) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:807) at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) at sun.rmi.transport.Transport$1.run(Transport.java:177) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:173) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142) at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source) at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993) at my.test.getNaturalEndpoints.main(getNaturalEndpoints.java:32) Caused by: java.lang.NullPointerException at org.apache.cassandra.db.Table.createReplicationStrategy(Table.java:266) at org.apache.cassandra.db.Table.<init>(Table.java:212) at org.apache.cassandra.db.Table.open(Table.java:106) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1497) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1480) at org.apache.cassandra.service.StorageService.getNaturalEndpoints(StorageService.java:1485) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:111) at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:45) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:226) at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:251) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1450) at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:90) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1285) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1383) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:807) at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) at sun.rmi.transport.Transport$1.run(Transport.java:177) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:173) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)
gne.tgz
Description: GNU Zip compressed data