Hello,

I'm new to cassandra. I'm using cassandra release 0.7.0 (local, single node). I 
can't perform write operations in case the column and supercolumn families have
different comparator types. For example if I use the code given in Issue: 
https://issues.apache.org/jira/browse/CASSANDRA-1712 by Jonathan Ellis in the 
CLI, I get the following output:

[default@Keyspace1] create keyspace KS1
8bb2fc2d-1fcb-11e0-add0-a9c93d38c544
[default@Keyspace1] use KS1
Authenticated to keyspace: KS1
[default@KS1] create column family CFCli with column_type= 'Super' and 
comparator= 'LongType' and subcomparator='UTF8Type'
97742bbe-1fcb-11e0-add0-a9c93d38c544
[default@KS1] set CFCli['newrow'][1234567890]['column'] = 'value'
'column' could not be translated into a LongType.

I also tried a setup with the release inclosed example keyspace (loaded via the 
StorageService bean loadSchemaFromYAML method):

   ColumnFamily: Super3 (Super)
   "A column family with supercolumns, whose column names are Longs (8 bytes)"
     Columns sorted by: 
org.apache.cassandra.db.marshal.LongType/org.apache.cassandra.db.marshal.BytesType
     Subcolumns sorted by: org.apache.cassandra.db.marshal.LongType
     Row cache size / save period: 0.0/0
     Key cache size / save period: 200000.0/3600
     Memtable thresholds: 0.2953125/63/60
     GC grace seconds: 864000
     Compaction min/max thresholds: 4/32

CLI output:

[default@Keyspace1] set Super3['account_value']['1:1'][1234567890] = 'value1'   
                             
A long is exactly 8 bytes: 3
[default@Keyspace1] set Super3['account_value'][1234567890]['test'] = 'value1'
'test' could not be translated into a LongType.
[default@Keyspace1] set Super3['account_value'][1234567890][1234567890] = 
'value1'
A long is exactly 8 bytes: 10
[default@Keyspace1] set Super3[1234567890][1234567890][1234567890] = 'value1' 
Syntax error at position 11: mismatched input '1234567890' expecting set null
[default@Keyspace1] set Super3['account_value']['test'][1234567890] = 'value1'
A long is exactly 8 bytes: 4
[default@Keyspace1] set Super3[1234567890]['test']['column'] = 'value1'       
Syntax error at position 11: mismatched input '1234567890' expecting set null


According to the CLI help the format is: set <cf>['<key>']['<super>']['<col>'] 
= <value>, thus the errors generated seem weird for me. What am I doing wrong?


Thanks in advance,

Kind regards,

Karin

Reply via email to