cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-2696) Exception adding validators to non-string columns
Date Tue, 24 May 2011 05:10:47 GMT

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

Jonathan Ellis commented on CASSANDRA-2696:
-------------------------------------------

It's totally in my patch!

{code}
-    public static void validateAliasCompares(org.apache.cassandra.thrift.CfDef cf_def) throws
ConfigurationException
-    {
-        AbstractType comparator = DatabaseDescriptor.getComparator(cf_def.comparator_type);
-        if (cf_def.key_alias != null)
-            comparator.validate(cf_def.key_alias);
-    }
{code}

Either I mis-applied the patch on commit or there was a bad merge to reintroduce it...

> Exception adding validators to non-string columns
> -------------------------------------------------
>
>                 Key: CASSANDRA-2696
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2696
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 0.8.0 beta 2
>            Reporter: Tyler Hobbs
>            Priority: Minor
>         Attachments: 2696-test.txt
>
>
> Adding column metadata to a column with a non-string name causes an Exception to be raised:
> {noformat}
> org.apache.cassandra.db.marshal.MarshalException: Expected 8 or 0 byte long (3)
> 	at org.apache.cassandra.db.marshal.LongType.validate(LongType.java:106)
> 	at org.apache.cassandra.config.CFMetaData.validateAliasCompares(CFMetaData.java:977)
> 	at org.apache.cassandra.config.CFMetaData.apply(CFMetaData.java:699)
> 	at org.apache.cassandra.db.migration.UpdateColumnFamily.<init>(UpdateColumnFamily.java:59)
> 	at org.apache.cassandra.thrift.CassandraServer.system_update_column_family(CassandraServer.java:968)
> 	at org.apache.cassandra.thrift.Cassandra$Processor$system_update_column_family.process(Cassandra.java:4032)
> 	at org.apache.cassandra.thrift.Cassandra$Processor.process(Cassandra.java:2889)
> 	at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:187)
> 	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)
> {noformat}
> For example, if the comparator type is LongType, adding a validator or index to column
int(3) will cause this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message