cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Yaskevich (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CASSANDRA-1635) cli not picking up type annotation on set
Date Wed, 20 Oct 2010 20:02:24 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-1635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923135#action_12923135
] 

Pavel Yaskevich commented on CASSANDRA-1635:
--------------------------------------------

my test (after applied CASSANDRA-1635.patch to the latest trunk):
{code}
[default@KS1] create column family Users with comparator=UTF8Type and column_metadata=[{column_name:first,
validation_class:UTF8Type}, {column_name:last, validation_class:UTF8Type}]
412367d6-dc83-11df-bf47-e700f669bcfc
[default@KS1] set Users[jsmith][first] = 'John'
Value inserted.
[default@KS1] set Users[jsmith][last] = 'Smith'
Value inserted.
[default@KS1] set Users[jsmith][age] = long(42)
Value inserted.
[default@KS1] get Users[jsmith]
=> (column=last, value=Smith, timestamp=1287604215498000)
=> (column=first, value=John, timestamp=1287604214111000)
=> (column=age, value=42, timestamp=1287604216661000)
Returned 3 results.
{code}

I use UTF8Type here manually because default comparator for column names is BytesType. Results
you get are very weird... 

if you mean convertValueByFunction method then it has boolean withUpdate argument which used
to determine if system update is need, I have also added polymorphic convertValueByFunction
3 arguments: columnFamily, columnName and tree argument, which calls convertValueByFunction
with withUpdate set to false.


> cli not picking up type annotation on set
> -----------------------------------------
>
>                 Key: CASSANDRA-1635
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1635
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>    Affects Versions: 0.7.0
>            Reporter: Jonathan Ellis
>            Assignee: Pavel Yaskevich
>             Fix For: 0.7.0
>
>         Attachments: CASSANDRA-1635.patch
>
>
> {code}
> [default@Keyspace1] create column family Users
> create column family Users
> 737c7a71-dc56-11df-8240-e700f669bcfc
> [default@Keyspace1] set Users[jsmith][first] = 'John'
> set Users[jsmith][first] = 'John'
> Value inserted.
> [default@Keyspace1] set Users[jsmith][last] = 'Smith'
> set Users[jsmith][last] = 'Smith'
> Value inserted.
> [default@Keyspace1] set Users[jsmith][age] = long(42)
> set Users[jsmith][age] = long(42)
> Value inserted.
> [default@Keyspace1] get Users[jsmith]
> get Users[jsmith]
> => (column=6c617374, value=Smith, timestamp=1287584999695000)
> => (column=6669727374, value=John, timestamp=1287584990126000)
> => (column=616765, value=^@^@^@^@^@^@^@*, timestamp=1287585014593000)
> Returned 3 results.
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message