cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-3553) value validator in the cli does not pick up
Date Fri, 02 Dec 2011 14:27:40 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-3553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pavel Yaskevich updated CASSANDRA-3553:
---------------------------------------

    Reviewer: jbellis  (was: cywjackson)
    
> value validator in the cli does not pick up
> -------------------------------------------
>
>                 Key: CASSANDRA-3553
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3553
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Jackson Chung
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>              Labels: cli
>             Fix For: 0.8.9, 1.0.6
>
>         Attachments: CASSANDRA-3553-1-0-specific-changes.patch, CASSANDRA-3553.patch
>
>
> the summary is probably confusing, so here is an example:
> {noformat}
> [default@testks] describe testcf;
>     ColumnFamily: testcf
>       Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>       Default column value validator: org.apache.cassandra.db.marshal.LongType
>       Columns sorted by: org.apache.cassandra.db.marshal.LongType
> {noformat}
> notice both column and column value are under LongType
> in the cli (without assume):
> [default@testks] set testcf['foo'][1293843587]=30; 
> null
> InvalidRequestException(why:(Expected 8 or 0 byte long (2)) [testks][testcf][1293843587]
failed validation)
>         at org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:15198)
>         at org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:858)
>         at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:830)
>         at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:902)
>         at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:216)
>         at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:220)
>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)
> so the above so the value cannot be validated, so now lets try to change the column name
also:
> [default@testks] set testcf['foo'][30]=30;               
> null
> InvalidRequestException(why:(Expected 8 or 0 byte long (2)) [testks][testcf][30] failed
validation)
>         at org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:15198)
>         at org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:858)
>         at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:830)
>         at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:902)
>         at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:216)
>         at org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:220)
>         at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)
> now lets set value with 8 characters:
> [default@testks] set testcf['foo'][30]=12345678;  
> Value inserted.
> so that shows column is fine, only the value part is not fine. put it in assume or long()
works:
> [default@testks] assume testcf validator as long;
> Assumption for column family 'testcf' added successfully.
> [default@testks] set testcf['foo'][30]=30;       
> Value inserted.
> or (restart to a new session to un-assume):
> [default@testks] set testcf['foo'][30]=long(30);         
> Value inserted.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message