Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 089AF200BB9 for ; Mon, 7 Nov 2016 09:11:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 072E2160AEB; Mon, 7 Nov 2016 08:11:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 00F6B160B10 for ; Mon, 7 Nov 2016 09:10:59 +0100 (CET) Received: (qmail 63265 invoked by uid 500); 7 Nov 2016 08:10:59 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 63056 invoked by uid 99); 7 Nov 2016 08:10:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2016 08:10:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C33B42C0D55 for ; Mon, 7 Nov 2016 08:10:58 +0000 (UTC) Date: Mon, 7 Nov 2016 08:10:58 +0000 (UTC) From: "Alex Petrov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-11672) Upgradesstables errors with "CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 07 Nov 2016 08:11:01 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-11672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Petrov updated CASSANDRA-11672: ------------------------------------ Description: Upgradesstables in C* 2.1 fails on thrift tables originally created on C*1.2 with the following error: {code} $ nodetool upgradesstables -a error: org.apache.cassandra.db.composites.CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName -- StackTrace -- java.lang.ClassCastException: org.apache.cassandra.db.composites.CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName at org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:86) at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:52) at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:46) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at org.apache.cassandra.io.sstable.SSTableIdentityIterator.hasNext(SSTableIdentityIterator.java:171) at org.apache.cassandra.utils.MergeIterator$OneToOne.computeNext(MergeIterator.java:202) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:645) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at org.apache.cassandra.db.ColumnIndex$Builder.buildForCompaction(ColumnIndex.java:166) at org.apache.cassandra.db.compaction.LazilyCompactedRow.write(LazilyCompactedRow.java:121) at org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:193) at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:126) at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:197) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:73) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$4.execute(CompactionManager.java:376) at org.apache.cassandra.db.compaction.CompactionManager$2.call(CompactionManager.java:304) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code} This problem is not seen if the thrift table was originally created in C* 2.0.x The suspicion is that this is related to the use of a CompositeType comparator. The following schema is an example of a cf that will cause this issue. {code} create column family cf1 with column_type = 'Standard' and comparator = 'CompositeType(org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.DateType),org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType)' and default_validation_class = 'UTF8Type' and key_validation_class = 'CompositeType(org.apache.cassandra.db.marshal.LongType,org.apache.cassandra.db.marshal.IntegerType)' and read_repair_chance = 1.0 and dclocal_read_repair_chance = 0.0 and populate_io_cache_on_flush = false and gc_grace = 259200 and min_compaction_threshold = 4 and max_compaction_threshold = 32 and replicate_on_write = true and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' and caching = 'KEYS_ONLY' and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor', 'chunk_length_kb' : '64'}; {code} You can workaround this via the creation of a dummy table and update of schema_columnfamilies for each cf affected. The dummy cf can be deleted afterwards. cassandra-cli [default@unknown] use ks1; [default@ks1] create column family foo; [default@ks1] use system; [default@system] set schema_columnfamilies['ks1']['cf1:is_dense']=01; [default@system] use ks1; [default@ks1] update column family foo with comment=''; was: Upgradesstables in C* 2.1 fails on thrift tables originally created on C*1.2 with the following error: {quote} $ nodetool upgradesstables -a error: org.apache.cassandra.db.composites.CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName -- StackTrace -- java.lang.ClassCastException: org.apache.cassandra.db.composites.CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName at org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:86) at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:52) at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:46) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at org.apache.cassandra.io.sstable.SSTableIdentityIterator.hasNext(SSTableIdentityIterator.java:171) at org.apache.cassandra.utils.MergeIterator$OneToOne.computeNext(MergeIterator.java:202) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at com.google.common.collect.Iterators$7.computeNext(Iterators.java:645) at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) at org.apache.cassandra.db.ColumnIndex$Builder.buildForCompaction(ColumnIndex.java:166) at org.apache.cassandra.db.compaction.LazilyCompactedRow.write(LazilyCompactedRow.java:121) at org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:193) at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:126) at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:197) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:73) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) at org.apache.cassandra.db.compaction.CompactionManager$4.execute(CompactionManager.java:376) at org.apache.cassandra.db.compaction.CompactionManager$2.call(CompactionManager.java:304) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {quote} This problem is not seen if the thrift table was originally created in C* 2.0.x The suspicion is that this is related to the use of a CompositeType comparator. The following schema is an example of a cf that will cause this issue. {quote} create column family cf1 with column_type = 'Standard' and comparator = 'CompositeType(org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.DateType),org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType)' and default_validation_class = 'UTF8Type' and key_validation_class = 'CompositeType(org.apache.cassandra.db.marshal.LongType,org.apache.cassandra.db.marshal.IntegerType)' and read_repair_chance = 1.0 and dclocal_read_repair_chance = 0.0 and populate_io_cache_on_flush = false and gc_grace = 259200 and min_compaction_threshold = 4 and max_compaction_threshold = 32 and replicate_on_write = true and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' and caching = 'KEYS_ONLY' and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor', 'chunk_length_kb' : '64'}; {quote} You can workaround this via the creation of a dummy table and update of schema_columnfamilies for each cf affected. The dummy cf can be deleted afterwards. cassandra-cli [default@unknown] use ks1; [default@ks1] create column family foo; [default@ks1] use system; [default@system] set schema_columnfamilies['ks1']['cf1:is_dense']=01; [default@system] use ks1; [default@ks1] update column family foo with comment=''; > Upgradesstables errors with "CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName" > -------------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-11672 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11672 > Project: Cassandra > Issue Type: Bug > Reporter: Simon Ashley > Assignee: Alex Petrov > > Upgradesstables in C* 2.1 fails on thrift tables originally created on C*1.2 with the following error: > {code} > $ nodetool upgradesstables -a > error: org.apache.cassandra.db.composites.CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName > -- StackTrace -- > java.lang.ClassCastException: org.apache.cassandra.db.composites.CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName > at org.apache.cassandra.db.OnDiskAtom$Serializer.deserializeFromSSTable(OnDiskAtom.java:86) > at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:52) > at org.apache.cassandra.db.AbstractCell$1.computeNext(AbstractCell.java:46) > at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) > at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) > at org.apache.cassandra.io.sstable.SSTableIdentityIterator.hasNext(SSTableIdentityIterator.java:171) > at org.apache.cassandra.utils.MergeIterator$OneToOne.computeNext(MergeIterator.java:202) > at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) > at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) > at com.google.common.collect.Iterators$7.computeNext(Iterators.java:645) > at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) > at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) > at org.apache.cassandra.db.ColumnIndex$Builder.buildForCompaction(ColumnIndex.java:166) > at org.apache.cassandra.db.compaction.LazilyCompactedRow.write(LazilyCompactedRow.java:121) > at org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:193) > at org.apache.cassandra.io.sstable.SSTableRewriter.append(SSTableRewriter.java:126) > at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:197) > at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) > at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:73) > at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) > at org.apache.cassandra.db.compaction.CompactionManager$4.execute(CompactionManager.java:376) > at org.apache.cassandra.db.compaction.CompactionManager$2.call(CompactionManager.java:304) > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > {code} > This problem is not seen if the thrift table was originally created in C* 2.0.x > The suspicion is that this is related to the use of a CompositeType comparator. > The following schema is an example of a cf that will cause this issue. > {code} > create column family cf1 > with column_type = 'Standard' > and comparator = 'CompositeType(org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.DateType),org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.UUIDType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType,org.apache.cassandra.db.marshal.AsciiType)' > and default_validation_class = 'UTF8Type' > and key_validation_class = 'CompositeType(org.apache.cassandra.db.marshal.LongType,org.apache.cassandra.db.marshal.IntegerType)' > and read_repair_chance = 1.0 > and dclocal_read_repair_chance = 0.0 > and populate_io_cache_on_flush = false > and gc_grace = 259200 > and min_compaction_threshold = 4 > and max_compaction_threshold = 32 > and replicate_on_write = true > and compaction_strategy = 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' > and caching = 'KEYS_ONLY' > and compression_options = {'sstable_compression' : 'org.apache.cassandra.io.compress.SnappyCompressor', 'chunk_length_kb' : '64'}; > {code} > You can workaround this via the creation of a dummy table and update of schema_columnfamilies for each cf affected. The dummy cf can be deleted afterwards. > cassandra-cli > [default@unknown] use ks1; > [default@ks1] create column family foo; > [default@ks1] use system; > [default@system] set schema_columnfamilies['ks1']['cf1:is_dense']=01; > [default@system] use ks1; > [default@ks1] update column family foo with comment=''; -- This message was sent by Atlassian JIRA (v6.3.4#6332)