Search code examples
hbasettl

HBase: Column Family TTL


According with HBase specs :

"ColumnFamilies can set a TTL length in seconds, and HBase will automatically delete rows once the expiration time is reached. This applies to all versions of a row - even the current one. The TTL time encoded in the HBase for the row is specified in UTC."

Specifically what I'm not understanding is this sentence "Once the expiration time is reached"...of what? All versions of all cells? at least one version of one cell?

Suppose I have a table which has a column family with TTL set to X.

  • I'm inserting a cell with timestamp 1: what is the expiry date of this row? 1 + X?
  • Next, I'm inserting another cell (using the same row key) with timestamp 2: what is the expiry date of the entire row? Still 1 + X or 2 + X?

Solution

  • That appears to be a typo in the HBase reference guide. It should say "cell", not "row"; a row has no built-in timestamp other than the timestamp of its cells.