Thanks, it works.

roland

Von: Michal Augustýn [mailto:augustyn.mic...@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 
"validation_class" but you should "validator_class".

Augi
2011/2/15 Roland Gude 
<roland.g...@yoochoose.com<mailto:roland.g...@yoochoose.com>>
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 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)


Von: Michal Augustýn 
[mailto:augustyn.mic...@gmail.com<mailto:augustyn.mic...@gmail.com>]
Gesendet: Dienstag, 15. Februar 2011 15:53
An: user@cassandra.apache.org<mailto: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 will 
not load these definitions during startup. See 
http://wiki.apache.org/cassandra/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 
<roland.g...@yoochoose.com<mailto:roland.g...@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 checks.

What do I need to put in my cassandra.yaml file?
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.config.DatabaseDescriptor - Fatal 
error: null; Can't construct a java object for 
tag:yaml.org<http://yaml.org>,2002:org.apache.cassandra.config.Config; 
exception=Cannot create property=keyspaces for 
JavaBean=org.apache.cassandra.config.Config@7eb6e2; Cannot create 
property=column_families for 
JavaBean=org.apache.cassandra.config.RawKeyspace@987a33; Cannot create 
property=column_metadata for 
JavaBean=org.apache.cassandra.config.RawColumnFamily@716cb7; Cannot create 
property=validation_class for 
JavaBean=org.apache.cassandra.config.RawColumnDefinition@e29820; Unable to find 
property 'validation_class' on class: 
org.apache.cassandra.config.RawColumnDefinition
Bad 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

Roland Gude
Software Engineer

Im Mediapark 8, 50670 Köln

+49 221 4544151 (Tel)
+49 221 4544159 (Fax)
+49 171 7894057 (Mobil)


Email: roland.g...@yoochoose.com<mailto:roland.g...@yoochoose.com>
WWW: www.yoochoose.com<http://www.yoochoose.com/>

YOOCHOOSE GmbH
Geschäftsführer: Dr. Uwe Alkemper, Michael Friedmann
Handelsregister: Amtsgericht Köln HRB 65275
Ust-Ident-Nr: DE 264 773 520
Sitz der Gesellschaft: Köln



Reply via email to