We should likely set the TTL automatically on indexes. We'd need to do something special for shared indexes (local and view indexes), as the TTL would only apply to a certain set of rows. Samarth - can you file a JIRA?
FYI, the reason we don't allow a different TTL for different column families is that if you deleted the cells in the first column family of the table (the one that contains our empty key value) without deleting the others, then you'd potentially get erroneous query results. On Wed, Feb 11, 2015 at 9:58 AM, Samarth Jain <[email protected]> wrote: > +1 to what Ralph said. > > FWIW, starting with 4.3 (soon to be out) we allow setting HBase properties > like TTL through ALTER TABLE. However, you can't have different TTL for > different column families. > > > On Wednesday, February 11, 2015, Perko, Ralph J <[email protected]> > wrote: >> >> That is a great point. Setting the TTL on the corresponding index tables >> would be necessary as well then, if this approach acceptable. >> >> >> From: Jean-Marc Spaggiari <[email protected]> >> Reply-To: "[email protected]" <[email protected]> >> Date: Wednesday, February 11, 2015 at 9:34 AM >> To: "[email protected]" <[email protected]> >> Subject: Re: TTL >> >> Hi Ralph, >> >> Thinking out loud... >> >> If you have an index on your table, the TTL will remove some data from the >> table but will not clean the references in the index table. So if you query >> using the index, that will return some data which doesn't exist anymore on >> the original table. Therefore you dataset will become un-consistent. >> >> I will let Phoenix experts confirm. >> >> JM >> >> 2015-02-11 12:29 GMT-05:00 Perko, Ralph J <[email protected]>: >>> >>> Hi – I attempted to set the TTL parameter using ALTER TABLE through >>> phoenix and received error 1025: Unsupported property set in ALTER TABLE >>> command >>> >>> I was, however, able to set this directly through the hbase shell. Is >>> there any problem with me going this route? >>> >>> Thanks, >>> Ralph >>> >> >
