You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by cyril auburtin <cy...@gmail.com> on 2012/05/06 13:10:25 UTC

[1.1] Can't create column

[default@ks] create column family Post with column_type = 'Standard' and
column_metadata = [{column_name: 'user', validation_class: 'UTF8Type'},
{column_name: 'type', validation_class: 'UTF8Type'}] and comment = 'bla';
java.lang.RuntimeException:
org.apache.cassandra.db.marshal.MarshalException: cannot parse 'user' as
hex bytes

Re: [1.1] Can't create column

Posted by Sylvain Lebresne <sy...@datastax.com>.
On Sun, May 6, 2012 at 2:19 PM, cyril auburtin <cy...@gmail.com> wrote:
> It's the comparator so? because I tried without the single quotes on
> column_name and same error

Yes, it's the comparator, not the single quotes. The column_name in
the column_metada is, as the name imply, a column name. Thus is must
be compatible with the column family comparator. The default
comparator of a column family is BytesType, which interpret it's value
has hex string representing bytes and thus you get the error that
"user" is not a hexadecimal string. So you have to specifiy a
comparator that specifically handle strings, like UTF8Type or
AsciiType.

--
Sylvain

> thanks
>
>
> 2012/5/6 Pierre Chalamet <pi...@chalamet.net>
>>
>> create column family Post with comparator=UTF8Type and
>> colum_metadata=[{column_name : user, validation_class : UTF8Type}] and
>> comment='bla’;
>>
>>
>>
>> - Pierre
>>
>>
>>
>> From: cyril auburtin [mailto:cyril.auburtin@gmail.com]
>> Sent: dimanche 6 mai 2012 13:10
>> To: user@cassandra.apache.org
>> Subject: [1.1] Can't create column
>>
>>
>>
>> [default@ks] create column family Post with column_type = 'Standard' and
>> column_metadata = [{column_name: 'user', validation_class: 'UTF8Type'},
>> {column_name: 'type', validation_class: 'UTF8Type'}] and comment = 'bla';
>>
>> java.lang.RuntimeException:
>> org.apache.cassandra.db.marshal.MarshalException: cannot parse 'user' as hex
>> bytes
>>
>>
>
>

Re: [1.1] Can't create column

Posted by Conan Cook <co...@amee.com>.
Just stumbled upon this by chance, is it related?

https://issues.apache.org/jira/browse/CASSANDRA-2497

Conan

On 6 May 2012 13:19, cyril auburtin <cy...@gmail.com> wrote:

> It's the comparator so? because I tried without the single quotes on
> column_name and same error
> thanks
>
>
> 2012/5/6 Pierre Chalamet <pi...@chalamet.net>
>
>> create column family Post with comparator=UTF8Type and
>> colum_metadata=[{column_name : user, validation_class : UTF8Type}] and
>> comment='bla’;****
>>
>> ** **
>>
>> - Pierre****
>>
>> ** **
>>
>> *From:* cyril auburtin [mailto:cyril.auburtin@gmail.com]
>> *Sent:* dimanche 6 mai 2012 13:10
>> *To:* user@cassandra.apache.org
>> *Subject:* [1.1] Can't create column****
>>
>> ** **
>>
>> [default@ks] create column family Post with column_type = 'Standard' and
>> column_metadata = [{column_name: 'user', validation_class: 'UTF8Type'},
>> {column_name: 'type', validation_class: 'UTF8Type'}] and comment = 'bla';
>> ****
>>
>> java.lang.RuntimeException:
>> org.apache.cassandra.db.marshal.MarshalException: cannot parse 'user' as
>> hex bytes****
>>
>> ** **
>>
>
>

Re: [1.1] Can't create column

Posted by cyril auburtin <cy...@gmail.com>.
It's the comparator so? because I tried without the single quotes on
column_name and same error
thanks

2012/5/6 Pierre Chalamet <pi...@chalamet.net>

> create column family Post with comparator=UTF8Type and
> colum_metadata=[{column_name : user, validation_class : UTF8Type}] and
> comment='bla’;****
>
> ** **
>
> - Pierre****
>
> ** **
>
> *From:* cyril auburtin [mailto:cyril.auburtin@gmail.com]
> *Sent:* dimanche 6 mai 2012 13:10
> *To:* user@cassandra.apache.org
> *Subject:* [1.1] Can't create column****
>
> ** **
>
> [default@ks] create column family Post with column_type = 'Standard' and
> column_metadata = [{column_name: 'user', validation_class: 'UTF8Type'},
> {column_name: 'type', validation_class: 'UTF8Type'}] and comment = 'bla';*
> ***
>
> java.lang.RuntimeException:
> org.apache.cassandra.db.marshal.MarshalException: cannot parse 'user' as
> hex bytes****
>
> ** **
>

RE: [1.1] Can't create column

Posted by Pierre Chalamet <pi...@chalamet.net>.
create column family Post with comparator=UTF8Type and
colum_metadata=[{column_name : user, validation_class : UTF8Type}] and
comment='bla';

 

- Pierre

 

From: cyril auburtin [mailto:cyril.auburtin@gmail.com] 
Sent: dimanche 6 mai 2012 13:10
To: user@cassandra.apache.org
Subject: [1.1] Can't create column

 

[default@ks] create column family Post with column_type = 'Standard' and
column_metadata = [{column_name: 'user', validation_class: 'UTF8Type'},
{column_name: 'type', validation_class: 'UTF8Type'}] and comment = 'bla';

java.lang.RuntimeException:
org.apache.cassandra.db.marshal.MarshalException: cannot parse 'user' as hex
bytes