cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-11672) Upgradesstables errors with "CompoundComposite cannot be cast to org.apache.cassandra.db.composites.CellName"
Date Mon, 07 Nov 2016 08:10:58 GMT

     [ 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)

Mime
View raw message