Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 85726 invoked from network); 16 Feb 2011 07:19:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2011 07:19:24 -0000 Received: (qmail 65666 invoked by uid 500); 16 Feb 2011 07:19:22 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 65310 invoked by uid 500); 16 Feb 2011 07:19:17 -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 65302 invoked by uid 99); 16 Feb 2011 07:19:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 07:19:16 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.32.181.184] (HELO ch1outboundpool.messaging.microsoft.com) (216.32.181.184) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 07:19:07 +0000 Received: from mail37-ch1-R.bigfish.com (216.32.181.169) by CH1EHSOBE011.bigfish.com (10.43.70.61) with Microsoft SMTP Server id 14.1.225.8; Wed, 16 Feb 2011 07:18:44 +0000 Received: from mail37-ch1 (localhost.localdomain [127.0.0.1]) by mail37-ch1-R.bigfish.com (Postfix) with ESMTP id BF3617C0166 for ; Wed, 16 Feb 2011 07:18:44 +0000 (UTC) X-SpamScore: -23 X-BigFish: VS-23(zzbb2dK62a3L4015Lbf2R168aJzz1202hzz8275bh8275dhz2dh87h2a8h668h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null);UIP:(null);IPVD:NLI;H:IE2RD2HUB024.red002.local;RD:none;EFVD:NLI X-FB-DOMAIN-IP-MATCH: fail Received: from mail37-ch1 (localhost.localdomain [127.0.0.1]) by mail37-ch1 (MessageSwitch) id 1297840723659083_21829; Wed, 16 Feb 2011 07:18:43 +0000 (UTC) Received: from CH1EHSMHS028.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.240]) by mail37-ch1.bigfish.com (Postfix) with ESMTP id 8FABD143804B for ; Wed, 16 Feb 2011 07:18:43 +0000 (UTC) Received: from IE2RD2HUB024.red002.local (213.199.187.153) by CH1EHSMHS028.bigfish.com (10.43.70.28) with Microsoft SMTP Server (TLS) id 14.1.225.8; Wed, 16 Feb 2011 07:18:43 +0000 Received: from IE2RD2XVS021.red002.local ([10.33.56.26]) by IE2RD2HUB024.red002.local ([10.43.198.102]) with mapi; Tue, 15 Feb 2011 23:18:35 -0800 From: Roland Gude To: "user@cassandra.apache.org" Date: Tue, 15 Feb 2011 23:18:34 -0800 Subject: AW: cant seem to figure out secondary index definition Thread-Topic: cant seem to figure out secondary index definition Thread-Index: AcvNJDpETbJ+kkC3SqeS6/DztceMfAAhW8Lw Message-ID: <120CB7532EA53A4D8CA6B63F94B4ADB351E4C36F1C@IE2RD2XVS021.red002.local> References: <120CB7532EA53A4D8CA6B63F94B4ADB351E4C36CB3@IE2RD2XVS021.red002.local> <120CB7532EA53A4D8CA6B63F94B4ADB351E4C36D41@IE2RD2XVS021.red002.local> In-Reply-To: Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE, en-US Content-Type: multipart/alternative; boundary="_000_120CB7532EA53A4D8CA6B63F94B4ADB351E4C36F1CIE2RD2XVS021r_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_120CB7532EA53A4D8CA6B63F94B4ADB351E4C36F1CIE2RD2XVS021r_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks, it works. roland Von: Michal August=FDn [mailto:augustyn.michal@gmail.com] Gesendet: Dienstag, 15. Februar 2011 16:22 An: user@cassandra.apache.org Betreff: Re: cant seem to figure out secondary index definition Ah, ok. I checked that in source and the problem is that you wrote "validat= ion_class" but you should "validator_class". Augi 2011/2/15 Roland Gude > Yeah i know about that, but the definition i have is for a cluster that is = started/stopped from a unit test with hector embeddedServerHelper, which ta= kes definitions from the yaml. So i'd still like to define the index in the yaml file (it should very well= be possible I guess) Von: Michal August=FDn [mailto:augustyn.michal@gmail.com] Gesendet: Dienstag, 15. Februar 2011 15:53 An: user@cassandra.apache.org Betreff: Re: cant seem to figure out secondary index definition Hi, if you download Cassandra and look into "conf/cassandra.yaml" then you can = see this: "this keyspace definition is for demonstration purposes only. Cassandra wil= l not load these definitions during startup. See http://wiki.apache.org/cas= sandra/FAQ#no_keyspaces for an explanation." So you should make all schema-related operation via Thrift/AVRO API, or you= can use Cassandra CLI. Augi 2011/2/15 Roland Gude > Hi, i am a little puzzled on creation of secondary indexes and the docs in that= area are still very sparse. What I am trying to do is - in a columnfamily with TimeUUID comparator, I w= ant the "special" timeuuid 00000000-0000-1000-0000-000000000000 to be index= ed. The value being some UTF8 string on which I want to perform equality ch= ecks. What do I need to put in my cassandra.yaml file? Something like this? - column_metadata: [{name: 00000000-0000-1000-0000-000000000000, validati= on_class: UTF8Type, index_name: MyIndex, index_type: KEYS}] This gives me that error: 15:05:12.492 [pool-1-thread-1] ERROR o.a.c.config.DatabaseDescriptor - Fata= l error: null; Can't construct a java object for tag:yaml.org,2002:org.apache.cassandra.config.Config; exception=3DCannot create prop= erty=3Dkeyspaces for JavaBean=3Dorg.apache.cassandra.config.Config@7eb6e2; = Cannot create property=3Dcolumn_families for JavaBean=3Dorg.apache.cassandr= a.config.RawKeyspace@987a33; Cannot create property=3Dcolumn_metadata for J= avaBean=3Dorg.apache.cassandra.config.RawColumnFamily@716cb7; Cannot create= property=3Dvalidation_class for JavaBean=3Dorg.apache.cassandra.config.Raw= ColumnDefinition@e29820; Unable to find property 'validation_class' on clas= s: org.apache.cassandra.config.RawColumnDefinition Bad configuration; unable to start server I am furthermor uncertain if the column name will be correctly used if give= n like this. Should I put the byte representation of the uuid there? Greetings, roland -- YOOCHOOSE GmbH Roland Gude Software Engineer Im Mediapark 8, 50670 K=F6ln +49 221 4544151 (Tel) +49 221 4544159 (Fax) +49 171 7894057 (Mobil) Email: roland.gude@yoochoose.com WWW: www.yoochoose.com YOOCHOOSE GmbH Gesch=E4ftsf=FChrer: Dr. Uwe Alkemper, Michael Friedmann Handelsregister: Amtsgericht K=F6ln HRB 65275 Ust-Ident-Nr: DE 264 773 520 Sitz der Gesellschaft: K=F6ln --_000_120CB7532EA53A4D8CA6B63F94B4ADB351E4C36F1CIE2RD2XVS021r_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Thanks, it = works.

 

roland

 

Vo= n: Michal August=FDn [mailto:augustyn.michal@gmail.com]
Gesendet:= Dienstag, 15. Februar 2011 16:22
An: user@cassandra.apache.o= rg
Betreff: Re: cant seem to figure out secondary index definitio= n

 

Ah, ok. I checked that in source and the problem is that y= ou wrote "validation_class" but you should "validator_class&= quot;.

 

<= div>

Augi

=

2011/2/15 Roland Gude <roland.gude@yoochoose.com>

=

Yea= h i know about that, but the definition i have is for a cluster that is sta= rted/stopped from a unit test with hector embeddedServerHelper, which takes= definitions from the yaml.

So i’d still like to define = the index in the yaml file (it should very well be possible I guess)=

 

 

<= span style=3D'font-size:10.0pt'>Von: Michal August=FDn [mailto:augustyn.michal@gmail.com]
Gesendet: Die= nstag, 15. Februar 2011 15:53
An: user@cassandra.apache.org
Betreff= : Re: cant seem to figure out secondary index definition

 

Hi,

 

if you download Cassand= ra and look into "conf/cassandra.yaml" then you can see this:

 

"t= his keyspace definition is for demonstration purposes only. Cassandra = will not load these definitions during startup. See http://wiki.a= pache.org/cassandra/FAQ#no_keyspaces for an explanation."

 

So you shoul= d make all schema-related operation via Thrift/AVRO API, or you can use Cas= sandra CLI.

 

Augi

 

2= 011/2/15 Roland Gude <roland.gude@yoochoose.com>

Hi,

=  

i am a little puzzled= on creation of secondary indexes and the docs in that area are still very = sparse.

What I am trying to = do is – in a columnfamily with TimeUUID comparator, I want the “= ;special” timeuuid 00000000-0000-1000-0000-000000000000 to be indexed= . The value being some UTF8 string on which I want to perform equality chec= ks.

 =

What do I need to put in my cassandra.yaml fi= le?

Something like this?

 

  - column_metadata: [{name: 00000000-0000-1000= -0000-000000000000, validation_class: UTF8Type, index_name: MyIndex, index_= type: KEYS}]

 

This gives me that error:

 

15:05:12.492 [pool-1-thread-1] ERROR o.a.c.conf= ig.DatabaseDescriptor - Fatal error: null; Can't construct a java object fo= r tag:yaml.org,2002:org.a= pache.cassandra.config.Config; exception=3DCannot create property=3Dkeyspac= es for JavaBean=3Dorg.apache.cassandra.config.Config@7eb6e2; Cannot create = property=3Dcolumn_families for JavaBean=3Dorg.apache.cassandra.config.RawKe= yspace@987a33; Cannot create property=3Dcolumn_metadata for JavaBean=3Dorg.= apache.cassandra.config.RawColumnFamily@716cb7; Cannot create property=3Dva= lidation_class for JavaBean=3Dorg.apache.cassandra.config.RawColumnDefiniti= on@e29820; Unable to find property 'validation_class' on class: org.apache.= cassandra.config.RawColumnDefinition

B= ad configuration; unable to start server

 

 

I am furthermor uncertain if = the column name will be correctly used if given like this. Should I put the= byte representation of the uuid there?

 

Greetings= ,

roland

--

YOOCHOOSE GmbH

&nb= sp;

Roland Gude

Software Engineer=

 = ;

Im Mediapark 8, 50670 K=F6ln

 

+49 221 4544151 (Tel)<= /p>

+49 221 4544159 (Fa= x)

+49 171 7894057 (Mobil)

 

 

Email: roland.gude@yoochoose.com

WWW: www.yoochoose.com

<= p class=3DMsoNormal style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:= auto'> 

YOOCHOOSE GmbH

Gesch=E4ftsf=FChrer: Dr. Uwe Alkemper, Michael Fried= mann

Handelsregister: Amtsgericht K=F6ln HRB 65275

Ust-Ident-Nr: DE 264 773 5= 20

Sitz der Gesellschaft: K=F6ln

 

 

 

<= /html>= --_000_120CB7532EA53A4D8CA6B63F94B4ADB351E4C36F1CIE2RD2XVS021r_--