Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution

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

 
1 ACCEPTED SOLUTION

Accepted Solutions

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

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

3 REPLIES 3

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

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

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

@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.

Highlighted

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

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

In HBase shell:-

hbase(main):013:0> major_compact 'tablename'
Don't have an account?
Coming from Hortonworks? Activate your account here