Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you update gc_grace_seconds using cassandra-cli?

Tags:

cassandra

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

like image 550
juan Avatar asked Mar 20 '13 14:03

juan


People also ask

How do you use alter command in Cassandra?

Using ALTER command, you can add a column to a table. While adding columns, you have to take care that the column name is not conflicting with the existing column names and that the table is not defined with compact storage option. Given below is the syntax to add a column to a table.

How do I change a table name in Cassandra?

Syntax: ALTER (TABLE | COLUMNFAMILY) <tablename> <instruction>

What is Gc_grace_seconds?

'gc_grace_seconds' is the time (in seconds, defined in Table properties) cassandra keep Tombstone so that other nodes which might be down during deletion of data can know the changes.

How do I remove a column from a table in Cassandra?

To remove a column from the table, use the DROP instruction: ALTER TABLE cycling. basic_info DROP birth_year; DROP removes the column from the table definition and marks the column values with tombstones.


1 Answers

On cassandra-cli is without "seconds"

UPDATE COLUMN FAMILY cf with GC_GRACE = 86400; //one day
like image 118
Christian Agrazar Avatar answered Oct 22 '22 09:10

Christian Agrazar