Is there a way to define a default ttl for cassandra cfs which is used if the columns have no ttl? I accidentally missed defining a ttl for a lot of columns and now I have to redefine it. Alternative: Is there an easy way to mass-update all columns and manually set a ttl?
There is no way to set a default TTL or to do a mass TTL update. You will need to scan your data and overwrite each column with a TTL'ed version.
In order to set lower TTLs on older data, you may find it useful to fetch the column timestamp when scanning your data. How you specify this depends on the client that you're using; in pycassa, for example, you might do something like cf.get_range('', '', ..., include_timestamp=True)
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.