incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AJ ...@dude.podzone.net>
Subject Re: CLI set command returns null, ver 0.8.0
Date Thu, 09 Jun 2011 04:05:51 GMT
Thanks Aaron,

I created a script and everything went OK.  I think that the problem is 
when you try to update a CF.  Below, I try to change the column 
comparator and it complains that the 'comparators do not match'.  Can 
you enlighten me on what that means?  There is no data in the CF at this 
point.

[default@Keyspace1] create column family User3;
503dba20-924b-11e0-0000-f1169bb35ddf
Waiting for schema agreement...
... schemas agree across the cluster
[default@Keyspace1] set User3['1']['name'] = 'mike';
org.apache.cassandra.db.marshal.MarshalException: cannot parse 'name' as 
hex bytes
java.lang.RuntimeException: 
org.apache.cassandra.db.marshal.MarshalException: cannot parse 'name' as 
hex bytes
         at 
org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:292)
         at 
org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
         at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)

[default@Keyspace1] describe keyspace;
Keyspace: Keyspace1:
   Replication Strategy: 
org.apache.cassandra.locator.NetworkTopologyStrategy
     Options: [datacenter1:1]
   Column Families:
     ColumnFamily: User3
       Key Validation Class: org.apache.cassandra.db.marshal.BytesType
       Default column value validator: 
org.apache.cassandra.db.marshal.BytesType
       Columns sorted by: org.apache.cassandra.db.marshal.BytesType
       Row cache size / save period in seconds: 0.0/0
       Key cache size / save period in seconds: 200000.0/14400
       Memtable thresholds: 0.2859375/61/1440 (millions of ops/MB/minutes)
       GC grace seconds: 864000
       Compaction min/max thresholds: 4/32
       Read repair chance: 1.0
       Replicate on write: false
       Built indexes: []
[default@Keyspace1]

/** Here, I figure the error above is because it cannot find the column 
called 'name' because it's using the BytesType column name 
sorter/comparator, so I try to change it below. */

[default@Keyspace1] update column family User3 with comparator = UTF8Type;
comparators do not match.
java.lang.RuntimeException: comparators do not match.
         at 
org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:292)
         at 
org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
         at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)
[default@Keyspace1]

What does "comparators do not match" mean?

Thanks,
Mike



On 6/8/2011 4:37 PM, aaron morton wrote:
> Can you provide the cli script to create the schema and info on how many nodes you have.
>
> Thanks
>
> -----------------
> Aaron Morton
> Freelance Cassandra Developer
> @aaronmorton
> http://www.thelastpickle.com
>
> On 8 Jun 2011, at 16:12, AJ wrote:
>
>> Can anyone help?  The CLI seems to be having issues.  The count command isn't working
either:
>>
>> [default@Keyspace1] count User[long(1)];
>> Expected 8 or 0 byte long (13)
>> java.lang.RuntimeException: Expected 8 or 0 byte long (13)
>>         at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:284)
>>         at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
>>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)
>> [default@Keyspace1]
>> [default@Keyspace1] count User[1];;
>> Expected 8 or 0 byte long (1)
>> java.lang.RuntimeException: Expected 8 or 0 byte long (1)
>>         at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:284)
>>         at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
>>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)
>> [default@Keyspace1] count User['1'];
>> Expected 8 or 0 byte long (1)
>> java.lang.RuntimeException: Expected 8 or 0 byte long (1)
>>         at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:284)
>>         at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
>>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)
>> [default@Keyspace1] count User['12345678'];
>> null
>> java.lang.RuntimeException
>>         at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:292)
>>         at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
>>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)
>> [default@Keyspace1]
>>
>>
>> Granted, there are no rows in the CF yet (see probs below), but this exception seems
to be during the parsing stage.
>>
>> I've check everything else, AFAIK, so I'm at a loss.
>>
>> Much obliged.
>>
>> On 6/7/2011 12:44 PM, AJ wrote:
>>> The log only shows INFO level messages about flushes, etc..
>>>
>>> The debug mode of the CLI shows an exception after the set:
>>>
>>> [mike@mars ~]$ cassandra-cli -h 192.168.1.101 --debug
>>> Connected to: "Test Cluster" on 192.168.1.101/9160
>>> Welcome to the Cassandra CLI.
>>>
>>> Type 'help;' or '?' for help.
>>> Type 'quit;' or 'exit;' to quit.
>>>
>>> [default@unknown] use Keyspace1;
>>> Authenticated to keyspace: Keyspace1
>>> [default@Keyspace1] set User[1]['name']='aaa';
>>> null
>>> java.lang.RuntimeException
>>>         at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:292)
>>>         at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
>>>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)
>>> [default@Keyspace1]
>>>
>>>
>


Mime
View raw message