proofpoint/kairosdb — pull request #31 by warmans (2014-02-17 13:17:19+00:00)
Title: Cassandra datapoint TTL setting

This merge adds the facility to set a time to live on incoming datapoints which will cause Cassandra to automatically remove these datapoints after the TTL expires.

We need this setting in our use case because we are adding far too much data to practically store for longer than a few months, also our data becomes useless quite quickly.

TTLs are only applied to the datapoints column family. I do not know how the string_index and row_key_index will be affected by this change. Testing the functionality against a live cassandra cluster does not uncover any odd behaviour but strings in the index may relate to data that is no longer available. I don't really think this matters unless you have a high turnover of metrics being added/removed.

The row index is more complicated because I don't believe a TTL could be applied until the final column of the row has been added. I'd appreciate advice on this topic.

This pull request also fixes some tabs/spaces inconsistencies in the source files.