You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by "Hiller, Dean" <De...@nrel.gov> on 2012/09/25 22:13:28 UTC

is this a cassandra bug?

This is cassandra 1.1.4

Describe shows DecimalType and I test setting comparator TOOOOO the DecimalType and it fails  (Realize I have never touched this column family until now except for posting data which succeeded)

[default@unknown] use databus;
Authenticated to keyspace: databus
[default@databus] describe bacnet9800AnalogInput9;
    ColumnFamily: bacnet9800AnalogInput9
      Key Validation Class: org.apache.cassandra.db.marshal.DecimalType
      Default column value validator: org.apache.cassandra.db.marshal.BytesType
      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
      GC grace seconds: 864000
      Compaction min/max thresholds: 4/32
      Read repair chance: 0.1
      DC Local Read repair chance: 0.0
      Replicate on write: true
      Caching: KEYS_ONLY
      Bloom Filter FP chance: default
      Built indexes: []
      Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
      Compression Options:
        sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
[default@databus] update column family bacnet9800AnalogInput9 with comparator = DecimalType;
org.apache.thrift.transport.TTransportException
[default@databus]

Exception from system.log from the node in the cluster is

ERROR [MigrationStage:1] 2012-09-25 14:11:20,327 AbstractCassandraDaemon.java (line 134) Exception in thread Thread[MigrationStage:1,5,main]
java.lang.RuntimeException: java.io.IOException: org.apache.cassandra.config.ConfigurationException: comparators do not match or are not compatible.
at org.apache.cassandra.utils.FBUtilities.unchecked(FBUtilities.java:628)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
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)
Caused by: java.io.IOException: org.apache.cassandra.config.ConfigurationException: comparators do not match or are not compatible.
at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:676)
at org.apache.cassandra.db.DefsTable.updateColumnFamily(DefsTable.java:463)
at org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:407)
at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271)
at org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:249)
at org.apache.cassandra.db.DefinitionsUpdateVerbHandler$1.runMayThrow(DefinitionsUpdateVerbHandler.java:48)
at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
... 6 more
Caused by: org.apache.cassandra.config.ConfigurationException: comparators do not match or are not compatible.
at org.apache.cassandra.config.CFMetaData.apply(CFMetaData.java:705)
at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:672)
... 12 more


Re: is this a cassandra bug?

Posted by Sylvain Lebresne <sy...@datastax.com>.
You're mistaking 'key validation class' and 'comparator'. It is your
key validation class that is DecimalType. Your comparator is UTF8Type,
and yes, switching the comparator from UTF8Type to DecimalType is not
allowed.

--
Sylvain

On Tue, Sep 25, 2012 at 10:13 PM, Hiller, Dean <De...@nrel.gov> wrote:
> This is cassandra 1.1.4
>
> Describe shows DecimalType and I test setting comparator TOOOOO the DecimalType and it fails  (Realize I have never touched this column family until now except for posting data which succeeded)
>
> [default@unknown] use databus;
> Authenticated to keyspace: databus
> [default@databus] describe bacnet9800AnalogInput9;
>     ColumnFamily: bacnet9800AnalogInput9
>       Key Validation Class: org.apache.cassandra.db.marshal.DecimalType
>       Default column value validator: org.apache.cassandra.db.marshal.BytesType
>       Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>       GC grace seconds: 864000
>       Compaction min/max thresholds: 4/32
>       Read repair chance: 0.1
>       DC Local Read repair chance: 0.0
>       Replicate on write: true
>       Caching: KEYS_ONLY
>       Bloom Filter FP chance: default
>       Built indexes: []
>       Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
>       Compression Options:
>         sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
> [default@databus] update column family bacnet9800AnalogInput9 with comparator = DecimalType;
> org.apache.thrift.transport.TTransportException
> [default@databus]
>
> Exception from system.log from the node in the cluster is
>
> ERROR [MigrationStage:1] 2012-09-25 14:11:20,327 AbstractCassandraDaemon.java (line 134) Exception in thread Thread[MigrationStage:1,5,main]
> java.lang.RuntimeException: java.io.IOException: org.apache.cassandra.config.ConfigurationException: comparators do not match or are not compatible.
> at org.apache.cassandra.utils.FBUtilities.unchecked(FBUtilities.java:628)
> at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
> 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)
> Caused by: java.io.IOException: org.apache.cassandra.config.ConfigurationException: comparators do not match or are not compatible.
> at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:676)
> at org.apache.cassandra.db.DefsTable.updateColumnFamily(DefsTable.java:463)
> at org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:407)
> at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271)
> at org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:249)
> at org.apache.cassandra.db.DefinitionsUpdateVerbHandler$1.runMayThrow(DefinitionsUpdateVerbHandler.java:48)
> at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
> ... 6 more
> Caused by: org.apache.cassandra.config.ConfigurationException: comparators do not match or are not compatible.
> at org.apache.cassandra.config.CFMetaData.apply(CFMetaData.java:705)
> at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:672)
> ... 12 more
>

Re: is this a cassandra bug?

Posted by "Hiller, Dean" <De...@nrel.gov>.
bump

On 9/25/12 2:40 PM, "Hiller, Dean" <De...@nrel.gov> wrote:

>Hmmm, is rowkey validation asynchronous to the actually sending of the
>data to cassandra?
>
>I seem to be able to put an invalid type and GET that invalid data back
>just fine even though my key type was an int and the key comparator was
>Decimal
>BUT then in the logs I see a validation fail exception but I never saw
>anything client sideŠin fact, the client READ back the data fine so I am
>bit confused hereŠ..1.1.4Š..I tested this on a single node after seeing it
>in our 6 node cluster with the same results.
>
>Thanks,
>Dean


Re: is this a cassandra bug?

Posted by "Hiller, Dean" <De...@nrel.gov>.
Hmmm, is rowkey validation asynchronous to the actually sending of the
data to cassandra? 

I seem to be able to put an invalid type and GET that invalid data back
just fine even though my type was an int and the comparator was Decimal
BUT then in the logs I see a validation fail exception but I never saw
anything client sideŠin fact, the client READ back the data fine so I am
bit confused hereŠ..1.1.4Š..I tested this on a single node after seeing it
in our 6 node cluster with the same results.

Thanks,
Dean

On 9/25/12 2:13 PM, "Hiller, Dean" <De...@nrel.gov> wrote:

>This is cassandra 1.1.4
>
>Describe shows DecimalType and I test setting comparator TOOOOO the
>DecimalType and it fails  (Realize I have never touched this column
>family until now except for posting data which succeeded)
>
>[default@unknown] use databus;
>Authenticated to keyspace: databus
>[default@databus] describe bacnet9800AnalogInput9;
>    ColumnFamily: bacnet9800AnalogInput9
>      Key Validation Class: org.apache.cassandra.db.marshal.DecimalType
>      Default column value validator:
>org.apache.cassandra.db.marshal.BytesType
>      Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
>      GC grace seconds: 864000
>      Compaction min/max thresholds: 4/32
>      Read repair chance: 0.1
>      DC Local Read repair chance: 0.0
>      Replicate on write: true
>      Caching: KEYS_ONLY
>      Bloom Filter FP chance: default
>      Built indexes: []
>      Compaction Strategy:
>org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
>      Compression Options:
>        sstable_compression:
>org.apache.cassandra.io.compress.SnappyCompressor
>[default@databus] update column family bacnet9800AnalogInput9 with
>comparator = DecimalType;
>org.apache.thrift.transport.TTransportException
>[default@databus]
>
>Exception from system.log from the node in the cluster is
>
>ERROR [MigrationStage:1] 2012-09-25 14:11:20,327
>AbstractCassandraDaemon.java (line 134) Exception in thread
>Thread[MigrationStage:1,5,main]
>java.lang.RuntimeException: java.io.IOException:
>org.apache.cassandra.config.ConfigurationException: comparators do not
>match or are not compatible.
>at org.apache.cassandra.utils.FBUtilities.unchecked(FBUtilities.java:628)
>at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34)
>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)
>Caused by: java.io.IOException:
>org.apache.cassandra.config.ConfigurationException: comparators do not
>match or are not compatible.
>at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:676)
>at 
>org.apache.cassandra.db.DefsTable.updateColumnFamily(DefsTable.java:463)
>at 
>org.apache.cassandra.db.DefsTable.mergeColumnFamilies(DefsTable.java:407)
>at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:271)
>at org.apache.cassandra.db.DefsTable.mergeRemoteSchema(DefsTable.java:249)
>at 
>org.apache.cassandra.db.DefinitionsUpdateVerbHandler$1.runMayThrow(Definit
>ionsUpdateVerbHandler.java:48)
>at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
>... 6 more
>Caused by: org.apache.cassandra.config.ConfigurationException:
>comparators do not match or are not compatible.
>at org.apache.cassandra.config.CFMetaData.apply(CFMetaData.java:705)
>at org.apache.cassandra.config.CFMetaData.reload(CFMetaData.java:672)
>... 12 more
>