You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by xavier manach <xa...@tekio.org> on 2010/05/31 11:33:46 UTC

How to drop a column family (Cassandra 6.1)

Hi

  In the API I see : system_drop_column_family *Requires Cassandra 0.7
*
  How to drop a column family with Cassandra 6.1 ?
*
Delete *the files MYCOLUMNFAMILY-XXX-Data.db,
MYCOLUMNFAMILY-XXX-Filter.db , MYCOLUMNFAMILY-XXX-Index.db
is a good ways ?

Can I recreate this columnfamily after this delete ?


Thanks.

Re: How to drop a column family (Cassandra 6.1)

Posted by xavier manach <xa...@tekio.org>.
Perfect :)


Thanks Ran.


2010/5/31 Ran Tavory <ra...@gmail.com>

> 1. nodetool flush
> 2. stop server
> 3. delete all files (data, index, filter)
> 4. start server
>
> note that this will delete the data, not the CF definition (not like "drop
> table" in sql-ish).
>
> system_drop_column_family will drop the CF definition
>
> truncate (available from 0.7) will delete the data, which is equivalent to
> the steps 1-4 above
>
>
> On Mon, May 31, 2010 at 12:33 PM, xavier manach <xa...@tekio.org> wrote:
>
>> Hi
>>
>>   In the API I see : system_drop_column_family *Requires Cassandra 0.7
>> *
>>   How to drop a column family with Cassandra 6.1 ?
>> *
>> Delete *the files MYCOLUMNFAMILY-XXX-Data.db,
>> MYCOLUMNFAMILY-XXX-Filter.db , MYCOLUMNFAMILY-XXX-Index.db
>> is a good ways ?
>>
>> Can I recreate this columnfamily after this delete ?
>>
>>
>> Thanks.
>>
>>
>

Re: How to drop a column family (Cassandra 6.1)

Posted by Ran Tavory <ra...@gmail.com>.
1. nodetool flush
2. stop server
3. delete all files (data, index, filter)
4. start server

note that this will delete the data, not the CF definition (not like "drop
table" in sql-ish).

system_drop_column_family will drop the CF definition

truncate (available from 0.7) will delete the data, which is equivalent to
the steps 1-4 above

On Mon, May 31, 2010 at 12:33 PM, xavier manach <xa...@tekio.org> wrote:

> Hi
>
>   In the API I see : system_drop_column_family *Requires Cassandra 0.7
> *
>   How to drop a column family with Cassandra 6.1 ?
> *
> Delete *the files MYCOLUMNFAMILY-XXX-Data.db,
> MYCOLUMNFAMILY-XXX-Filter.db , MYCOLUMNFAMILY-XXX-Index.db
> is a good ways ?
>
> Can I recreate this columnfamily after this delete ?
>
>
> Thanks.
>
>