Skip to main content
Satya_Singh
Silver ⭐️⭐️
January 26, 2021
Solved

How to delete tombstone in Hbase

Hi,

I am not able to permanently delete tombstone in Hbase.

Tombstone markers are flushed for non-MOB column family but it is not flushed for the MOB column family.

 

Any solution to delete the same so that we save some hdfs space.

 

Regards,

Satya

rki_
rki_Answer
Gold ⭐️
April 28, 2022

There is no direct method or property to disable tombstone marker. Major compacting the mob CF is the only way to go. There is a mob cleaner running on master that removes unreferenced mob files:

The period of the cleaner chore can be configured by setting hbase.master.mob.cleaner.period to a positive integer number of seconds. It defaults to running daily. You should not need to tune it unless you have a very aggressive TTL or a very high rate of MOB updates with a correspondingly high rate of non-MOB compactions.

So you can check and set the above parameter value and can manually trigger mob compaction by specifying the cf that includes mob data in hbase shell.

 

NOTE : MOBs are mostly for writing large cells that will rarely be updated or deleted but could have TTL configured for the cell or CF.

5 replies

Satya_Singh
Silver ⭐️⭐️
January 27, 2021

Can anyone help on this?

 

Translate
ms730
Silver ⭐️⭐️
February 28, 2022

I am also looking for a solution for the same problem.... Can anyone help?

Translate
rki_
Gold ⭐️
Gold ⭐️
April 28, 2022

The cells which are deleted will have a tombstone marker and this will get deleted once you run a major compaction on that table. it deletes records and combines Hfiles.

Translate
ms730
Silver ⭐️⭐️
April 28, 2022

This is the issue that even after running major compaction the tombstone markers were not deleted.

hbase(main):107:0* scan 'CBST:TEST', {RAW => TRUE}
ROW COLUMN+CELL
Test101 column=cfDocContent:doc, timestamp=1650962333104, type=Delete
Test102 column=cfDocContent:doc, timestamp=1650962333121, type=Delete
Test103 column=cfDocContent:doc, timestamp=1650962333136, type=Delete
Test104 column=cfDocContent:doc, timestamp=1650962333150, type=Delete
Test105 column=cfDocContent:doc, timestamp=1650962333167, type=Delete
5 row(s)
Took 0.0182 seconds
hbase(main):108:0>

Translate
rki_
Gold ⭐️
rki_Answer
Gold ⭐️
April 28, 2022

There is no direct method or property to disable tombstone marker. Major compacting the mob CF is the only way to go. There is a mob cleaner running on master that removes unreferenced mob files:

The period of the cleaner chore can be configured by setting hbase.master.mob.cleaner.period to a positive integer number of seconds. It defaults to running daily. You should not need to tune it unless you have a very aggressive TTL or a very high rate of MOB updates with a correspondingly high rate of non-MOB compactions.

So you can check and set the above parameter value and can manually trigger mob compaction by specifying the cf that includes mob data in hbase shell.

 

NOTE : MOBs are mostly for writing large cells that will rarely be updated or deleted but could have TTL configured for the cell or CF.

Translate