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/11/29 11:28:48 UTC
Need help in updating metadata of an existing column family
Hi,
I have an existing column family that is created with comparator BytesType.
I want to add a built-in index to this column family and I am executing the
following command using CLI:
=================================================
update column family MyCF with comparator=BytesType and
column_metadata=[{column_name: userid, validation_class: UTF8Type,
index_type: KEYS, index_name: ACUserIdIdx}];
=================================================
However the column metadata that actually gets added has the column name *
"fffffd"* and not *"userid".*
>From a previous thread, I have understood that in this case Cassandra
treats the column name I have given as bytes (due to comparator BytesType),
and hence comes up with a different name.
*Any workaround solution for creating the column metadata with the correct
column name?*
Regards,
--
Roshan
http://roshandawrani.wordpress.com/
Re: Need help in updating metadata of an existing column family
Posted by Roshan Dawrani <ro...@gmail.com>.
Is it possible to update the column-metadata of a column family definition
programmatically? If yes, can someone please point me to the right classes
to use?
Thanks.
On Thu, Nov 29, 2012 at 3:58 PM, Roshan Dawrani <ro...@gmail.com>wrote:
> Hi,
>
> I have an existing column family that is created with comparator
> BytesType. I want to add a built-in index to this column family and I am
> executing the following command using CLI:
>
> =================================================
> update column family MyCF with comparator=BytesType and
> column_metadata=[{column_name: userid, validation_class: UTF8Type,
> index_type: KEYS, index_name: ACUserIdIdx}];
> =================================================
>
> However the column metadata that actually gets added has the column name *
> "fffffd"* and not *"userid".*
>
> From a previous thread, I have understood that in this case Cassandra
> treats the column name I have given as bytes (due to comparator BytesType),
> and hence comes up with a different name.
>
> *Any workaround solution for creating the column metadata with the
> correct column name?*
>
> Regards,
> --
> Roshan
> http://roshandawrani.wordpress.com/
>
>
--
Roshan
http://roshandawrani.wordpress.com/
RE Need help in updating metadata of an existing column family
Posted by Romain HARDOUIN <ro...@urssaf.fr>.
Hi Roshan,
Take a peep at
http://www.datastax.com/docs/1.1/dml/using_cli#reading-rows-and-columns
Hope that helps.
Cheers
Roshan Dawrani <ro...@gmail.com> a écrit sur 29/11/2012 11:28:48 :
> Roshan Dawrani <ro...@gmail.com>
> 29/11/2012 11:28
>
> Veuillez répondre à
> user@cassandra.apache.org
>
> A
>
> user <us...@cassandra.apache.org>,
>
> cc
>
> Objet
>
> Need help in updating metadata of an existing column family
>
> Hi,
>
> I have an existing column family that is created with comparator
> BytesType. I want to add a built-in index to this column family and
> I am executing the following command using CLI:
>
> =================================================
> update column family MyCF with comparator=BytesType and
> column_metadata=[{column_name: userid, validation_class: UTF8Type,
> index_type: KEYS, index_name: ACUserIdIdx}];
> =================================================
>
> However the column metadata that actually gets added has the column name
> "fffffd" and not "userid".
>
> From a previous thread, I have understood that in this case
> Cassandra treats the column name I have given as bytes (due to
> comparator BytesType), and hence comes up with a different name.
>
> Any workaround solution for creating the column metadata with the
> correct column name?
>
> Regards,
> --
> Roshan
> http://roshandawrani.wordpress.com/