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.

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

Highlighted

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

New Contributor
 
1 REPLY 1

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

New 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