12
votes

What is the command to update a column family and alter its gc_grace_seconds value using cassandra-cli?

3

3 Answers

10
votes

On cassandra-cli is without "seconds"

UPDATE COLUMN FAMILY cf with GC_GRACE = 86400; //one day
33
votes

For CQLSH

alter table <table_name> with GC_GRACE_SECONDS = <timeout>;

e.g:

alter table yawn with GC_GRACE_SECONDS = 3600;

where yawn is our table name and 3600 is an hour;

2
votes
use ks;
update column family cf with gc_grace_seconds = 864000;