phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chinmay Kulkarni <>
Subject Re: TTL on a single column family in table
Date Tue, 04 Sep 2018 22:30:12 GMT
Hi Domen,

After PHOENIX-1409, we don't allow specifying a TTL for a specific column
family and all column families share the same TTL value. If you were to
alter this using HBase APIs, this could lead to many inconsistencies at the
Phoenix level where we assume all CFs to have the same TTL value. For
example, if you were to alter the TTL value of the empty/default column
family for a table, then a select count(*) query on the table would reflect
a different value depending whether the TTL for that column family has
expired or not. Whereas, if you were to alter the TTL for any other column
family, this would not affect the result of the select count(*) since we
use the dummy value written to the empty/default column family to
efficiently calculate count(*). There may also be other code paths that
could give inconsistent results after this change.

In fact, PHOENIX-3955 aims to propagate the TTL, REPLICATION_SCOPE and
KEEP_DELETED_CELLS properties to all column families of a table as well as
its indexes, in order to keep data in sync between the base table and its
indexes. What is the reason you wish to manually alter the TTL of a single
column family?

On Tue, Sep 4, 2018 at 3:29 PM Thomas D'Silva <>

> If you  set different TTLs for column families you can run into issues
> with SELECT count(*) queries not working correctly (depending on which
> column family is used to store the EMPTY_COLUMN_VALUE).
> On Tue, Sep 4, 2018 at 10:56 AM, Sergey Soldatov <
>> wrote:
>> What is the use case to set TTL only for a single column family? I would
>> say that making TTL table wide is a mostly technical decision because in
>> relational databases we operate with rows and supporting TTL for only some
>> columns sounds a bit strange.
>> Thanks,
>> Sergey
>> On Fri, Aug 31, 2018 at 7:43 AM Domen Kren <> wrote:
>>> Hello,
>>> we have situation where we would like to set TTL on a single column
>>> family in a table. After getting errors while trying to do that trough a
>>> phoenix command i found this issue,
>>>, where it said "TTL
>>> - James Taylor and I discussed offline and we decided that for now we will
>>> only be supporting for all column families to have the same TTL as the
>>> empty column family. This means we error out if a column family is
>>> specified while setting TTL property - both at CREATE TABLE and ALTER TABLE
>>> time. Also changes were made to make sure that any new column family added
>>> gets the same TTL as the empty CF."
>>> If i understand correctly, this was a design decision and not a
>>> technical one. So my question is, if i change this configuration trough
>>> HBase API or console, could there be potential problems that arise in
>>> phoenix?
>>> Thanks you and best regards,
>>> Domen Kren

Chinmay Kulkarni
M.S. Computer Science,
University of Illinois at Urbana-Champaign.
B. Tech Computer Engineering,
College of Engineering, Pune.

View raw message