You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Roshan Dawrani <ro...@gmail.com> on 2012/05/22 13:01:50 UTC

Cassandra 0.8.5: Column name mystery in create column family command

Hi,

I use Cassandra 0.8.5 and am suddenly noticing some strange behavior. I run
a "create column family" command with some column meta-data and it runs
fine, but when I do "describe keyspace", it shows me different column names
for those index columns.

a) Here is what I run:
"create column family UserTemplate with comparator=BytesType and
column_metadata=[{*column_name: userid*, validation_class: UTF8Type,
index_type: KEYS, index_name: TemplateUserIdIdx}, {*column_name: type*,
validation_class: UTF8Type, index_type: KEYS, index_name:
TemplateTypeIdx}];"

b) This is what "describe keyspace" shows:
    ColumnFamily: UserTemplate
      Key Validation Class: org.apache.cassandra.db.marshal.BytesType
      ...
      ...
      Built indexes: [UserTemplate.TemplateTypeIdx,
UserTemplate.TemplateUserIdIdx]
      Column Metadata:
        *Column Name: ffffff*
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: TemplateUserIdIdx
          Index Type: KEYS
        *Column Name: 0dfffaff*
          Validation Class: org.apache.cassandra.db.marshal.UTF8Type
          Index Name: TemplateTypeIdx
          Index Type: KEYS

Does anyone see why this must be happening? I have created many such column
families before and never run into this issue.

-- 
Roshan
http://roshandawrani.wordpress.com/

Re: Cassandra 0.8.5: Column name mystery in create column family command

Posted by samal <sa...@gmail.com>.
I an not able to reproduce this in cli.
On 22-May-2012 8:12 PM, "Roshan Dawrani" <ro...@gmail.com> wrote:

> Can you please let me know why? Because I have created very similar column
> familes many times with comparator = BytesType, and never run into this
> issue before.
>
> Here is an example:
>
> --------------------------------------------------------------------
> ColumnFamily: Client
>   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
>   ...
>   ...
>   Built indexes: [Client.ACUserIdIdx]
>   Column Metadata:
>     Column Name: userid (757365726964)
>       Validation Class: org.apache.cassandra.db.marshal.LexicalUUIDType
>       Index Name: ACUserIdIdx
>       Index Type: KEYS
> --------------------------------------------------------------------
>
> On Tue, May 22, 2012 at 6:16 PM, samal <sa...@gmail.com> wrote:
>
>> Change your comparator to utf8type.
>> On 22-May-2012 4:32 PM, "Roshan Dawrani" <ro...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I use Cassandra 0.8.5 and am suddenly noticing some strange behavior. I
>>> run a "create column family" command with some column meta-data and it runs
>>> fine, but when I do "describe keyspace", it shows me different column names
>>> for those index columns.
>>>
>>> a) Here is what I run:
>>> "create column family UserTemplate with comparator=BytesType and
>>> column_metadata=[{*column_name: userid*, validation_class: UTF8Type,
>>> index_type: KEYS, index_name: TemplateUserIdIdx}, {*column_name: type*,
>>> validation_class: UTF8Type, index_type: KEYS, index_name:
>>> TemplateTypeIdx}];"
>>>
>>> b) This is what "describe keyspace" shows:
>>>     ColumnFamily: UserTemplate
>>>       Key Validation Class: org.apache.cassandra.db.marshal.BytesType
>>>       ...
>>>       ...
>>>       Built indexes: [UserTemplate.TemplateTypeIdx,
>>> UserTemplate.TemplateUserIdIdx]
>>>       Column Metadata:
>>>         *Column Name: ffffff*
>>>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>>>           Index Name: TemplateUserIdIdx
>>>           Index Type: KEYS
>>>         *Column Name: 0dfffaff*
>>>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>>>           Index Name: TemplateTypeIdx
>>>           Index Type: KEYS
>>>
>>> Does anyone see why this must be happening? I have created many such
>>> column families before and never run into this issue.
>>>
>>> --
>>> Roshan
>>> http://roshandawrani.wordpress.com/
>>>
>>>
>
>
> --
> Roshan
> http://roshandawrani.wordpress.com/
>
>

Re: Cassandra 0.8.5: Column name mystery in create column family command

Posted by Roshan Dawrani <ro...@gmail.com>.
Can you please let me know why? Because I have created very similar column
familes many times with comparator = BytesType, and never run into this
issue before.

Here is an example:

--------------------------------------------------------------------
ColumnFamily: Client
  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
  ...
  ...
  Built indexes: [Client.ACUserIdIdx]
  Column Metadata:
    Column Name: userid (757365726964)
      Validation Class: org.apache.cassandra.db.marshal.LexicalUUIDType
      Index Name: ACUserIdIdx
      Index Type: KEYS
--------------------------------------------------------------------

On Tue, May 22, 2012 at 6:16 PM, samal <sa...@gmail.com> wrote:

> Change your comparator to utf8type.
> On 22-May-2012 4:32 PM, "Roshan Dawrani" <ro...@gmail.com> wrote:
>
>> Hi,
>>
>> I use Cassandra 0.8.5 and am suddenly noticing some strange behavior. I
>> run a "create column family" command with some column meta-data and it runs
>> fine, but when I do "describe keyspace", it shows me different column names
>> for those index columns.
>>
>> a) Here is what I run:
>> "create column family UserTemplate with comparator=BytesType and
>> column_metadata=[{*column_name: userid*, validation_class: UTF8Type,
>> index_type: KEYS, index_name: TemplateUserIdIdx}, {*column_name: type*,
>> validation_class: UTF8Type, index_type: KEYS, index_name:
>> TemplateTypeIdx}];"
>>
>> b) This is what "describe keyspace" shows:
>>     ColumnFamily: UserTemplate
>>       Key Validation Class: org.apache.cassandra.db.marshal.BytesType
>>       ...
>>       ...
>>       Built indexes: [UserTemplate.TemplateTypeIdx,
>> UserTemplate.TemplateUserIdIdx]
>>       Column Metadata:
>>         *Column Name: ffffff*
>>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>>           Index Name: TemplateUserIdIdx
>>           Index Type: KEYS
>>         *Column Name: 0dfffaff*
>>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>>           Index Name: TemplateTypeIdx
>>           Index Type: KEYS
>>
>> Does anyone see why this must be happening? I have created many such
>> column families before and never run into this issue.
>>
>> --
>> Roshan
>> http://roshandawrani.wordpress.com/
>>
>>


-- 
Roshan
http://roshandawrani.wordpress.com/

Re: Cassandra 0.8.5: Column name mystery in create column family command

Posted by samal <sa...@gmail.com>.
Change your comparator to utf8type.
On 22-May-2012 4:32 PM, "Roshan Dawrani" <ro...@gmail.com> wrote:

> Hi,
>
> I use Cassandra 0.8.5 and am suddenly noticing some strange behavior. I
> run a "create column family" command with some column meta-data and it runs
> fine, but when I do "describe keyspace", it shows me different column names
> for those index columns.
>
> a) Here is what I run:
> "create column family UserTemplate with comparator=BytesType and
> column_metadata=[{*column_name: userid*, validation_class: UTF8Type,
> index_type: KEYS, index_name: TemplateUserIdIdx}, {*column_name: type*,
> validation_class: UTF8Type, index_type: KEYS, index_name:
> TemplateTypeIdx}];"
>
> b) This is what "describe keyspace" shows:
>     ColumnFamily: UserTemplate
>       Key Validation Class: org.apache.cassandra.db.marshal.BytesType
>       ...
>       ...
>       Built indexes: [UserTemplate.TemplateTypeIdx,
> UserTemplate.TemplateUserIdIdx]
>       Column Metadata:
>         *Column Name: ffffff*
>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>           Index Name: TemplateUserIdIdx
>           Index Type: KEYS
>         *Column Name: 0dfffaff*
>           Validation Class: org.apache.cassandra.db.marshal.UTF8Type
>           Index Name: TemplateTypeIdx
>           Index Type: KEYS
>
> Does anyone see why this must be happening? I have created many such
> column families before and never run into this issue.
>
> --
> Roshan
> http://roshandawrani.wordpress.com/
>
>