You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Donal Zang <za...@ihep.ac.cn> on 2010/12/07 23:28:08 UTC
Can super column family use column_metadata?
Hi,
I'm using 0.7.0-rc1,and when I use cassandra-cli to create a column
family with metadata, I got "null",and no column family is created.
The command I use is:
/create keyspace test;
use test;
create column family test1 with column_type = 'Super' and comparator =
'LongType' and column_metadata
=[{column_name:a,validation_class:LongType}];/
And also the examples gived by "help create column family;" won't work!
Any ideas?
Thanks!
Re: Can super column family use column_metadata?
Posted by Jonathan Ellis <jb...@gmail.com>.
On Tue, Dec 7, 2010 at 4:28 PM, Donal Zang <za...@ihep.ac.cn> wrote:
> Hi,
> I'm using 0.7.0-rc1,and when I use cassandra-cli to create a column family
> with metadata, I got "null",and no column family is created.
> The command I use is:
>
> create keyspace test;
> use test;
> create column family test1 with column_type = 'Super' and comparator =
> 'LongType' and column_metadata =[{column_name:a,validation_class:LongType}];
Looks like a bug in the CLI:
https://issues.apache.org/jira/browse/CASSANDRA-1835
> And also the examples gived by "help create column family;" won't work!
The first two work fine for me. The third has an column name that
conflicts with the comparator definition; I've fixed that in r1043274.
This works:
create column family Foo with comparator=UTF8Type and
column_metadata=[{ column_name:test, validation_class:IntegerType,
index_type:0, index_name:TextIdx}, { column_name:'other name',
validation_class:LongType }];
--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com