From user-return-27187-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Tue Jun 26 07:08:02 2012 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 66830C97E for ; Tue, 26 Jun 2012 07:08:02 +0000 (UTC) Received: (qmail 91589 invoked by uid 500); 26 Jun 2012 07:08:00 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 91536 invoked by uid 500); 26 Jun 2012 07:08:00 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 91524 invoked by uid 99); 26 Jun 2012 07:07:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 07:07:59 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.252.97.80] (HELO mailout.artfiles.de) (80.252.97.80) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 07:07:51 +0000 Received: from [62.143.152.70] (helo=[192.168.0.169]) auth=info@overtronic.de by mailout.artfiles.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) id 1SjPs1-0000Y2-Ka for user@cassandra.apache.org; Tue, 26 Jun 2012 09:07:29 +0200 From: =?iso-8859-1?Q?Ivo_Mei=DFner?= Content-Type: multipart/alternative; boundary="Apple-Mail=_FF631EB2-3C2D-4B2A-8630-30CF97E59173" Subject: Secondary index data gone after restart (1.1.1) Date: Tue, 26 Jun 2012 09:07:29 +0200 Message-Id: To: user@cassandra.apache.org Mime-Version: 1.0 (Apple Message framework v1278) X-Mailer: Apple Mail (2.1278) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_FF631EB2-3C2D-4B2A-8630-30CF97E59173 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, I am running into some problems with secondary indexes that I am unable = to track down. When I restart the cassandra service, the secondary index = data won't load and I get the following error during startup:=20 INFO 08:29:42,127 Opening = /var/myproject/cassandra/data/mykeyspace/group_admin/mykeyspace-group_admi= n.group_admin_groupId_idx-hd-1 (20808 bytes) ERROR 08:29:42,159 Exception in thread Thread[SSTableBatchOpen:1,5,main] java.lang.ClassCastException: java.math.BigInteger cannot be cast to = java.nio.ByteBuffer at = org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)= at = org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45) at = org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89) at = org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38) at java.util.TreeMap.getEntry(TreeMap.java:328) at java.util.TreeMap.containsKey(TreeMap.java:209) at java.util.TreeSet.contains(TreeSet.java:217) at = org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:396)= at = org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:187)= at = org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:225= ) at = java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at = java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) 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) When the service starts I can still select data from the column family, = but not using the secondary index.=20 After I execute "nodetool rebuild_index" the secondary index works fine = again until the next restart.=20 The error only seems to occur on the column groupId (TimeUUIDType). The = other index on userId seems to work.=20 I have the following column family definition:=20 create column family group_admin with comparator =3D UTF8Type and key_validation_class =3D UTF8Type and column_metadata =3D [ {column_name: id, validation_class: UTF8Type}, {column_name: added, validation_class: LongType}, {column_name: userId, validation_class: BytesType, index_type: = KEYS}, {column_name: requestMessage, validation_class: UTF8Type}, {column_name: status, validation_class: LongType}, {column_name: groupId, validation_class: TimeUUIDType, index_type: = KEYS} ]; Thank you very much for your help! Ivo= --Apple-Mail=_FF631EB2-3C2D-4B2A-8630-30CF97E59173 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii at = org.apache.cassandra.db.marshal.TimeUUIDType.compare(TimeUUIDType.java:37)=
= at = org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
= at = org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)=
= at = org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
=
= at java.util.TreeMap.getEntry(TreeMap.java:328)
at = java.util.TreeMap.containsKey(TreeMap.java:209)
at = java.util.TreeSet.contains(TreeSet.java:217)
at = org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:396)=
= at = org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:187)=
= at = org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:225= )
= at = java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
= at = java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
= at = java.util.concurrent.FutureTask.run(FutureTask.java:138)
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)

When the service starts I can still select data from the column family, = but not using the secondary index. 
After I execute = "nodetool rebuild_index" the secondary index works fine again until the = next restart. 

The error only seems to = occur on the column groupId (TimeUUIDType). The other index on userId = seems to work. 

I have the following = column family definition: 

  comparator =3D = UTF8Type and
  key_validation_class =3D UTF8Type = and
  column_metadata =3D [
    {column_name: userId, = validation_class: BytesType, index_type: KEYS},
    {column_name: status, = validation_class: LongType},
    {column_name: groupId, = validation_class: TimeUUIDType, index_type: KEYS}