Skip to main content
SnehasishRSC
Silver ⭐️
May 19, 2022
Solved

Set cell-level TTL for existing rows in HBase

Hi Community,

 

We are working on a new requirement where I need to disable table-level TTL and rather use cell-level TTL for one of our HBase tables.

 

I can disable the table-level TTL by altering the table property and set cell-level TTL for new incoming data. However, I can't find anything on how can I set cell-level TTL for the data / rows that are already existing in the table.

 

Any suggestions will be very helpful.

 

Thank you,

Snehasish

rki_
rki_Answer
Gold ⭐️
June 1, 2022

Cell TTL is something that is defined at insertion time. So for an already existing data, you can perform a put of the same cell, which then will have the exact cell value on a new Hfile with the new TTL for the cell.

2 replies

rki_
Gold ⭐️
rki_Answer
Gold ⭐️
June 1, 2022

Cell TTL is something that is defined at insertion time. So for an already existing data, you can perform a put of the same cell, which then will have the exact cell value on a new Hfile with the new TTL for the cell.

Translate
VidyaSargur
Community Manager
Community Manager
June 6, 2022

@SnehasishRSC, Has the reply helped resolve your issue? If so, can you please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future?

Translate
Regards, Vidya Sargur, Community Manager Was your question answered? Make sure to mark the answer as the accepted solution. If you find a reply useful, say thanks by clicking on the thumbs up button.