Class MasterRegionFlusherAndCompactor

java.lang.Object
org.apache.hadoop.hbase.master.region.MasterRegionFlusherAndCompactor
All Implemented Interfaces:
Closeable, AutoCloseable

@Private class MasterRegionFlusherAndCompactor extends Object implements Closeable
As long as there is no RegionServerServices for a master local region, we need implement the flush and compaction logic by our own.

The flush logic is very simple, every time after calling a modification method in RegionProcedureStore, we will call the onUpdate() method below, and in this method, we will check the memstore size and if it is above the flush size, we will call HRegion.flush(boolean) to force flush all stores.

And for compaction, the logic is also very simple. After flush, we will check the store file count, if it is above the compactMin, we will do a major compaction.