Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Is there any way to stop an HBase major compaction?

avatar

I would need to stop an hbase major compaction since it is affecting the performance of reads/writes

1 ACCEPTED SOLUTION

avatar
Rising Star

@joan_viladrosa 
We don’t have any possible way to stop the compaction in flight in a gracious manner, but we can stop the major compaction by restarting the specific region server where the major compaction is running.

View solution in original post

5 REPLIES 5

avatar
Super Collaborator

Please set the value for hbase.hregion.majorcompaction to "0"

<property>  

  <name>hbase.hregion.majorcompaction</name> 

   <value>0</value>  

 </property>

This will disable the major compactions and you can trigger it manually during the off peak hours. Make sure we restart hbase services for this to take effect.

avatar

This is for disabling future major compactions, but is there any way to stop a running major compaction?

avatar
Super Collaborator

@Joan Viladrosa

No .. I don't think we can do that .

avatar
Master Mentor

@Joan Viladrosa there was a JIRA https://issues.apache.org/jira/browse/HBASE-5147 that proposed such functionality but since major compaction is part of normal operations for HBASE, it was marked as resolved. I don't know of any way of stopping compaction in flight in a gracious manner. Perhaps you'd want to open a JIRA again and try your luck? In general, you are better off turning off future compactions and manage schedule via cron. Seems to me this is a minor inconvenience and you won't get much luck getting it through.

avatar
Rising Star

@joan_viladrosa 
We don’t have any possible way to stop the compaction in flight in a gracious manner, but we can stop the major compaction by restarting the specific region server where the major compaction is running.