cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abhishek Verma (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-9348) Nodetool move output should be more user friendly if bad token is supplied
Date Tue, 22 Mar 2016 00:58:25 GMT


Abhishek Verma commented on CASSANDRA-9348:

I am new to Cassandra and came across this while looking for low hanging fruits. 

After digging up, I found that the reason you get this error is because -9223372036854775809
= -2^63-1 is just outside the range of a Long, thus throwing a NumberFormatException (,
which gets thrown as a ConfigurationException, which finally gets thrown as an IOException
and the string "For input string: ". 
I also found that StorageService.move performs out of range checks robustly (

However, I agree that the displayed error in this case is not very clear. I intend to change
it the Exception message to: "Invalid token: For input string: ....".
If everyone agrees that this is acceptable, I will go ahead and create a patch.

> Nodetool move output should be more user friendly if bad token is supplied
> --------------------------------------------------------------------------
>                 Key: CASSANDRA-9348
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: sequoyha pelletier
>            Priority: Trivial
>              Labels: lhf
> If you put a token into nodetool move that is out of range for the partitioner you get
the following error:
> {noformat}
> [architect@md03-gcsarch-lapp33 11:01:06 ]$ nodetool -h -u cassandra -pw
cassandra move \\-9223372036854775809 
> Exception in thread "main" For input string: "-9223372036854775809"

> at org.apache.cassandra.service.StorageService.move( 
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> at sun.reflect.NativeMethodAccessorImpl.invoke( 
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(

> at java.lang.reflect.Method.invoke( 
> at sun.reflect.misc.Trampoline.invoke( 
> at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) 
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(

> at java.lang.reflect.Method.invoke( 
> at sun.reflect.misc.MethodUtil.invoke( 
> at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(

> at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(

> at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM( 
> at com.sun.jmx.mbeanserver.PerInterface.invoke( 
> at com.sun.jmx.mbeanserver.MBeanSupport.invoke( 
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(

> at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke( 
> at

> at

> at$300(

> at$

> at Method) 
> at

> at 
> at sun.reflect.GeneratedMethodAccessor52.invoke(Unknown Source) 
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(

> at java.lang.reflect.Method.invoke( 
> at sun.rmi.server.UnicastServerRef.dispatch( 
> at sun.rmi.transport.Transport$ 
> at sun.rmi.transport.Transport$ 
> at Method) 
> at sun.rmi.transport.Transport.serviceCall( 
> at sun.rmi.transport.tcp.TCPTransport.handleMessages( 
> at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0( 
> at sun.rmi.transport.tcp.TCPTransport$ 
> at java.util.concurrent.ThreadPoolExecutor.runWorker( 
> at java.util.concurrent.ThreadPoolExecutor$ 
> at 
> {noformat}
> This ticket is just requesting that we catch the exception an output something along
the lines of "Token supplied is outside of the acceptable range" for those that are still
in the Cassandra learning curve.

This message was sent by Atlassian JIRA

View raw message