cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler L. Hobbs (JIRA)" <j...@apache.org>
Subject [jira] Created: (CASSANDRA-1373) OrderPreservingPartitioner with type validated indexed columns causes ClassCastException
Date Tue, 10 Aug 2010 01:29:16 GMT
OrderPreservingPartitioner with type validated indexed columns causes ClassCastException
----------------------------------------------------------------------------------------

                 Key: CASSANDRA-1373
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1373
             Project: Cassandra
          Issue Type: Bug
          Components: Core
    Affects Versions: 0.7.0
         Environment: Cassandra Trunk
            Reporter: Tyler L. Hobbs
            Priority: Minor
             Fix For: 0.7.0


If OrderPreservingPartitioner is used and you have an indexed column with a type validator,
using batch_mutate to insert column values (like pycassa does) on the same key and indexed
column causes a ClassCastException to be thrown the *second* time you execute it.  That is,
the first batch_mutate succeeds, but the following ones fail.  CollatedOrderPreservingPartitioner
seems to avoid this problem.  Also, it appears that the row key is being compared to the column
value at some point using the validator's Comparator class (such as LongType) which is where
the actual exception is thrown.

Stack trace below:
{noformat}
java.lang.RuntimeException: java.lang.ClassCastException: java.lang.String cannot be cast
to [B
	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
	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:619)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to [B
	at org.apache.cassandra.db.marshal.LongType.compare(LongType.java:27)
	at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:82)
	at org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:37)
	at java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:878)
	at java.util.concurrent.ConcurrentSkipListMap.putIfAbsent(ConcurrentSkipListMap.java:1893)
	at org.apache.cassandra.db.Memtable.resolve(Memtable.java:127)
	at org.apache.cassandra.db.Memtable.put(Memtable.java:119)
	at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:508)
	at org.apache.cassandra.db.Table.applyCF(Table.java:452)
	at org.apache.cassandra.db.Table.apply(Table.java:409)
	at org.apache.cassandra.db.RowMutation.apply(RowMutation.java:196)
	at org.apache.cassandra.service.StorageProxy$2.runMayThrow(StorageProxy.java:276)
	at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
	... 3 more
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message