cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-4269) Setting column metadata for non-string comparator CFs breaks
Date Tue, 22 May 2012 14:47:42 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-4269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281005#comment-13281005
] 

Sylvain Lebresne commented on CASSANDRA-4269:
---------------------------------------------

Agreed. The problem here is really much of an implementation detail. We happen to generate
the CFDefinition object used by CQL3 in CFMetatData, and this even if CQL3 is not used per
se. So internally it's easier if the code support non-utf8 columns, even though CQL3 won't
allow to create them. Basically the patch make sure we correctly convert column names to string
when going in the CQL3 side.
                
> Setting column metadata for non-string comparator CFs breaks
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-4269
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4269
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: Tyler Hobbs
>            Assignee: Sylvain Lebresne
>            Priority: Trivial
>             Fix For: 1.1.1
>
>         Attachments: 4269.txt
>
>
> For example, use a comparator of LongType and try to create an index on a column named
2 (0x0000000000000002).  You'll get a stracktrace in the logs similar to this:
> {noformat}
> java.lang.RuntimeException: java.nio.charset.MalformedInputException: Input length =
2
> 	at org.apache.cassandra.cql3.ColumnIdentifier.<init>(ColumnIdentifier.java:50)
> 	at org.apache.cassandra.cql3.CFDefinition.<init>(CFDefinition.java:115)
> 	at org.apache.cassandra.config.CFMetaData.updateCfDef(CFMetaData.java:1278)
> 	at org.apache.cassandra.config.CFMetaData.columnMetadata(CFMetaData.java:225)
> 	at org.apache.cassandra.config.CFMetaData.fromThrift(CFMetaData.java:636)
> 	at org.apache.cassandra.thrift.CassandraServer.system_update_column_family(CassandraServer.java:1061)
> 	at org.apache.cassandra.thrift.Cassandra$Processor$system_update_column_family.getResult(Cassandra.java:3436)
> 	at org.apache.cassandra.thrift.Cassandra$Processor$system_update_column_family.getResult(Cassandra.java:3424)
> 	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
> 	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
> 	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)
> Caused by: java.nio.charset.MalformedInputException: Input length = 2
> 	at java.nio.charset.CoderResult.throwException(CoderResult.java:260)
> 	at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:781)
> 	at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:163)
> 	at org.apache.cassandra.utils.ByteBufferUtil.string(ByteBufferUtil.java:120)
> 	at org.apache.cassandra.cql3.ColumnIdentifier.<init>(ColumnIdentifier.java:46)
> 	... 13 more
> {noformat}
> This works in Cassandra 0.8 and 1.0.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message