Support Questions

Find answers, ask questions, and share your expertise

how to run major compaction and how to monitor them while runnning ?

avatar
New Contributor
 
1 REPLY 1

avatar
Contributor

You can run major compaction manually by running the following commands:

hbase shell
major_compact 'TABLE_NAME'

You can also configure that compaction runs automatically by adding this properties in hbase-site.xml:

hbase.regionserver.compaction.enabled
hbase.hregion.majorcompaction
hbase.hregion.majorcompaction.jitter
hbase.hstore.compactionThreshold

You can find more informations here:

https://hbase.apache.org/book.html#_enabling

But be careful, do only major compaction if all region are assigend. No Region should be in RIT (Region in Transition). Also major compaction is a heavyweight operation. So you should run it, when the cluster load is low.

You can monitor the compaction in the HBase Master UI.

Regards,

Michael