In later versions of cassandra, you actually set gc_grace_seconds for each column family as part of the schema. From what I can tell, Astyanax does not currently support setting this property. There is no corresponding method in the ColumnFamilyDefinition class.
https://github.com/Netflix/astyanax/blob/master/src/main/java/com/netflix/astyanax/ddl/ColumnFamilyDefinition.java
You can use the cassandra-cli tool to set the property in any existing column families if you want.
Also, it seems too complicated to add Astyanax support. I am sure they will agree to a pull request.
Update
Astyanax (for a while) now supports this setting. See ColumnFamilyDefinition . This can be set up in creating the astyanax column family as follows:
OperationResult<SchemaChangeResult> opres = keyspace.createColumnFamily(cf, ImmutableMap.<String, Object> builder() .put("comparator", "UTF8Type") .put("key_validation_class", "UTF8Type") .put("gc_grace_seconds", 60*60*24)
source share