cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Ricardo Motta Gomes (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6803) nodetool getsstables converts key from String incorrectly
Date Sun, 18 May 2014 00:40:16 GMT


Paulo Ricardo Motta Gomes commented on CASSANDRA-6803:

hm, not cool. I have a CF with a BytesType key validator, and now I'm getting an exception
when trying to call nodetool getsstables <keyspace> <cf> <rowKeyStr>.

Exception in thread "main" org.apache.cassandra.db.marshal.MarshalException: cannot parse
'mobly' as hex bytes
	at org.apache.cassandra.db.marshal.BytesType.fromString(
	at org.apache.cassandra.db.ColumnFamilyStore.getSSTablesForKey(
	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.GeneratedMethodAccessor6.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 sun.reflect.GeneratedMethodAccessor16.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$
Caused by: java.lang.NumberFormatException: An hex string representing bytes must have an
even length
	at org.apache.cassandra.utils.Hex.hexToBytes(
	at org.apache.cassandra.db.marshal.BytesType.fromString(
	... 36 more

Used to work before this fix. Works if I convert my String to hexBytes. Is this a bug or expected

> nodetool getsstables converts key from String incorrectly
> ---------------------------------------------------------
>                 Key: CASSANDRA-6803
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Nate McCall
>            Assignee: Nate McCall
>             Fix For: 1.2.16, 2.0.7
>         Attachments: sstables_for_key_blob_support.txt, sstables_for_key_blob_support_2.0.txt
> Trivial fix, just need to get the bytebuffer from the CfMetaData's key validator as opposed
to just calling String#getBytes (which is broken for most data types).  

This message was sent by Atlassian JIRA

View raw message