You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Tyler L. Hobbs (JIRA)" <ji...@apache.org> on 2010/08/10 03:29:16 UTC
[jira] Created: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
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.
[jira] Updated: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1373:
--------------------------------------
Assignee: Jonathan Ellis
Affects Version/s: 0.7 beta 1
(was: 0.7.0)
Priority: Major (was: Minor)
> 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 beta 1
> Environment: Cassandra Trunk
> Reporter: Tyler L. Hobbs
> Assignee: Jonathan Ellis
> Fix For: 0.7 beta 2
>
> Attachments: 1373.txt
>
>
> 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.
[jira] Updated: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1373:
--------------------------------------
Attachment: 1373.txt
> 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 beta 1
> Environment: Cassandra Trunk
> Reporter: Tyler L. Hobbs
> Assignee: Jonathan Ellis
> Fix For: 0.7 beta 2
>
> Attachments: 1373.txt
>
>
> 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.
[jira] Commented: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899834#action_12899834 ]
Hudson commented on CASSANDRA-1373:
-----------------------------------
Integrated in Cassandra #517 (See [https://hudson.apache.org/hudson/job/Cassandra/517/])
fix updating index when value is changed. patch by jbellis; tested by Tyler Hobbs for CASSANDRA-1373
> 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 beta 1
> Environment: Cassandra Trunk
> Reporter: Tyler L. Hobbs
> Assignee: Jonathan Ellis
> Fix For: 0.7 beta 2
>
> Attachments: 1373.txt
>
>
> 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.
[jira] Updated: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1373:
--------------------------------------
Attachment: 1373.txt
> 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 beta 2
>
> Attachments: 1373.txt
>
>
> 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.
[jira] Commented: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899144#action_12899144 ]
Jonathan Ellis commented on CASSANDRA-1373:
-------------------------------------------
correct patch attached.
> 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 beta 1
> Environment: Cassandra Trunk
> Reporter: Tyler L. Hobbs
> Assignee: Jonathan Ellis
> Fix For: 0.7 beta 2
>
> Attachments: 1373.txt
>
>
> 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.
[jira] Commented: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Tyler L. Hobbs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899163#action_12899163 ]
Tyler L. Hobbs commented on CASSANDRA-1373:
-------------------------------------------
New stacktrace with patch 1373.txt (2010-08-16 06:35 PM) applied:
\\
{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:28)
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.findPredecessor(ConcurrentSkipListMap.java:685)
at java.util.concurrent.ConcurrentSkipListMap.doPut(ConcurrentSkipListMap.java:864)
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$1.runMayThrow(StorageProxy.java:194)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
... 3 more
{noformat}
> 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 beta 1
> Environment: Cassandra Trunk
> Reporter: Tyler L. Hobbs
> Assignee: Jonathan Ellis
> Fix For: 0.7 beta 2
>
> Attachments: 1373.txt
>
>
> 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.
[jira] Updated: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-1373:
--------------------------------------
Attachment: (was: 1373.txt)
> 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 beta 1
> Environment: Cassandra Trunk
> Reporter: Tyler L. Hobbs
> Assignee: Jonathan Ellis
> Fix For: 0.7 beta 2
>
> Attachments: 1373.txt
>
>
> 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.
[jira] Commented: (CASSANDRA-1373) OrderPreservingPartitioner with
type validated indexed columns causes ClassCastException
Posted by "Tyler L. Hobbs (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899470#action_12899470 ]
Tyler L. Hobbs commented on CASSANDRA-1373:
-------------------------------------------
Patch was not exercised correctly last time. The patch does fix the issue, now.
> 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 beta 1
> Environment: Cassandra Trunk
> Reporter: Tyler L. Hobbs
> Assignee: Jonathan Ellis
> Fix For: 0.7 beta 2
>
> Attachments: 1373.txt
>
>
> 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.