Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Need an easy and performant way to purge data older than 24 months from Hbase Tables

avatar
 
1 ACCEPTED SOLUTION

avatar
Guru

You can use Time To Live (TTL) attribute for the table for this. You can read about it here https://hbase.apache.org/book.html#ttl

View solution in original post

3 REPLIES 3

avatar
Guru

You can use Time To Live (TTL) attribute for the table for this. You can read about it here https://hbase.apache.org/book.html#ttl

avatar

@Enis

Thanks for the quick response.

After setting TTL in table we have to run the Major to delete older-than-TTL-time data right?

How to do this.

avatar

you can use "major_compact" command to run a major compaction on the table.

In HBase shell:-

hbase(main):013:0> major_compact 'tablename'