cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "akshat (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Deleted] (CASSANDRA-6524) Trigger ERROR with java.lang.IllegalArgumentException at java.nio.Buffer.limit(Buffer.java:267)
Date Thu, 26 Dec 2013 07:25:50 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-6524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

akshat updated CASSANDRA-6524:
------------------------------

    Comment: was deleted

(was: Hi David,

I noticed this error while doing "RowMutation" on column family having CompositeType comparator.
This error was not observed on column family having comparator "UTF8Type". 
Does it mean that ITrigger with RowMutation feature only support for non CompositeType columns
as of now?
This can be improved in stable release.

Thanks,
Akshat)

> Trigger ERROR with java.lang.IllegalArgumentException at java.nio.Buffer.limit(Buffer.java:267)
> -----------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-6524
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6524
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Cassandra 2.0.2 - Windows 7 64bit
>            Reporter: David Viet
>
> I follow the Trigger example of Cassandra.
> *My test Column Family*
> CREATE TABLE test (
>   key text,
>   value text,
>   PRIMARY KEY (key)
> )
> *My index for test Column Family*
> CREATE TABLE sampleindex (
>   name text,
>   value text,
>   PRIMARY KEY (name)
> )
> Instead of cell.name(), I use ByteBufferUtil.bytes("value"): 
> *mutation.add("sampleindex", ByteBufferUtil.bytes("value"), key ,System.currentTimeMillis());*
> This line of code always cause error:
>  WARN 14:19:00,854 Exception
> java.lang.IllegalArgumentException
>         at java.nio.Buffer.limit(Buffer.java:267)
>         at org.apache.cassandra.db.marshal.AbstractCompositeType.getBytes(AbstractCompositeType.java:55)
>         at org.apache.cassandra.db.marshal.AbstractCompositeType.getWithShortLength(AbstractCompositeType.java:64)
>         at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:82)
>         at org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35)
>         at java.util.TreeMap.compare(TreeMap.java:1188)
>         at java.util.TreeMap.put(TreeMap.java:531)
>         at org.apache.cassandra.db.TreeMapBackedSortedColumns.addColumn(TreeMapBackedSortedColumns.java:90)
>         at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:116)
>         at org.apache.cassandra.db.ColumnFamily.addColumn(ColumnFamily.java:128)
>         at org.apache.cassandra.db.RowMutation.add(RowMutation.java:144)
>         at org.apache.cassandra.db.RowMutation.add(RowMutation.java:154)
>         at org.apache.cassandra.triggers.InvertedIndex.augment(InvertedIndex.java:83)
>         at org.apache.cassandra.triggers.TriggerExecutor.execute(TriggerExecutor.java:123)
>         at org.apache.cassandra.triggers.TriggerExecutor.execute(TriggerExecutor.java:73)
>         at org.apache.cassandra.service.StorageProxy.mutateWithTriggers(StorageProxy.java:567)
>         at org.apache.cassandra.cql3.statements.ModificationStatement.executeWithoutCondition(ModificationStatement.java:379)
>         at org.apache.cassandra.cql3.statements.ModificationStatement.execute(ModificationStatement.java:363)
>         at org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:129)
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:145)
>         at org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:136)
>         at org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1936)
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4394)
>         at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4378)
>         at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
>         at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
>         at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:194)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:722)
> I think the main reason is from https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
> {code:title=AbstractCompositeType.java|borderStyle=solid}
> public static ByteBuffer getBytes(ByteBuffer bb, int length)
> {
> ByteBuffer copy = bb.duplicate();
> copy.limit(copy.position() + length);
> bb.position(bb.position() + length);
> return copy;
> }
> {code}
> Please consider this problem. Thank you.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message