Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA343CFF5 for ; Tue, 22 May 2012 12:47:09 +0000 (UTC) Received: (qmail 40471 invoked by uid 500); 22 May 2012 12:47:07 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 40439 invoked by uid 500); 22 May 2012 12:47:07 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 40431 invoked by uid 99); 22 May 2012 12:47:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 12:47:07 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of samalgorai@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2012 12:47:02 +0000 Received: by werb13 with SMTP id b13so3210418wer.31 for ; Tue, 22 May 2012 05:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=nzjOi1On8ZxjQfRyQlrKK2bN//RCv2CtbN0RlWaTnLs=; b=zj33sqdOnurY42dnmRC50aKmlR4AZaysPTEqxMBKcM6MtUHpevluxj1ZYXEv6Dt2Lx U3/JDvbYT0rUwRKMqQjhNz3tCHP/lvMee56OzgLOzyPTchLsHTM1e2KurM/NSRemtnwJ IKtcrOIiZvyvNYV+tjfTv7tZ1eruEEjWLMeye4U0cOc2ArShKFYXsN4fcfWGEbCEZ2hO J2F89r/yIKCRKbhOAYVFdBrgsa93rs5xvKs9faPJcmR3ZwsKnhv9Wa8V1vF5wal/FYQH B+ZvrRqJOwwbzdQWm8iDV36DaU/KYDQ4NScjGnzsmcCvkH1zsqqJpquJDJPNXPBtY6Ym vx5A== MIME-Version: 1.0 Received: by 10.216.207.67 with SMTP id m45mr1214065weo.175.1337690800693; Tue, 22 May 2012 05:46:40 -0700 (PDT) Received: by 10.223.158.66 with HTTP; Tue, 22 May 2012 05:46:40 -0700 (PDT) Received: by 10.223.158.66 with HTTP; Tue, 22 May 2012 05:46:40 -0700 (PDT) In-Reply-To: References: Date: Tue, 22 May 2012 18:16:40 +0530 Message-ID: Subject: Re: Cassandra 0.8.5: Column name mystery in create column family command From: samal To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e6d9a2d4fea12204c09f68f2 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d9a2d4fea12204c09f68f2 Content-Type: text/plain; charset=UTF-8 Change your comparator to utf8type. On 22-May-2012 4:32 PM, "Roshan Dawrani" 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/ > > --0016e6d9a2d4fea12204c09f68f2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Change your comparator to utf8type.

On 22-May-2012 4:32 PM, "Roshan Dawrani&quo= t; <roshandawrani@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 som= e column meta-data and it runs fine, but when I do "describe keyspace&= quot;, it shows me different column names for those index columns.

a) Here is what I run:=C2=A0
"create col= umn family UserTemplate with comparator=3DBytesType and column_metadata=3D[= {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:
=C2=A0 =C2=A0 ColumnFamily: UserTemplate
=C2=A0 =C2= =A0 =C2=A0 Key Validation Class: org.apache.cassandra.db.marshal.BytesType<= /div>
=C2=A0 =C2=A0 =C2=A0 ...
=C2=A0 =C2=A0 =C2=A0 ...
=C2=A0 =C2=A0 =C2=A0 Built indexes:= [UserTemplate.TemplateTypeIdx, UserTemplate.TemplateUserIdIdx]
= =C2=A0 =C2=A0 =C2=A0 Column Metadata:
=C2=A0 =C2=A0 =C2=A0 =C2=A0= Column Name: ffffff
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Va= lidation Class: org.apache.cassandra.db.marshal.UTF8Type
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Index Name: TemplateUserIdIdx
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Index Type: KEYS
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 Column Name: 0dfffaff
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 Validation Class: org.apache.cassandra.db.marshal.UTF8= Type
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Index Name: TemplateTypeI= dx
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Index Type: KEYS
--0016e6d9a2d4fea12204c09f68f2--