in the major compact function of hbase, the parameter hbase. hregion. majorcompaction has been set to 0.
the log still shows that major compact is used.
there are three ways to trigger major compact
1) trigger by running the hbase shell command major_compact
2) compact when file <= sum (smaller_files) *
'hbase. hstore. compaction. ratio '
in this case, when the number of selected files is equal to the number of files in the store, minor compact will be upgraded to major compact
3) major compact expiration time interval: after (now-min (storefile. timestamp)>
"hbase. hregion. majorcompaction "+ rand () *
hbase. hregion. majorcompaction. jitter "
As for split, hbase. hregion. Max. filesize (10 Gb by default) is not set to a large value to ensure that the split is not performed.Algorithm, See
Increasingtoupperboundregionsplitpolicy is 0.94.0 default region split policy
Here, split has a judgment condition. Calculate the number of online region of the table on the tableregionscount (regionserver ),
Then, it cyclically calculates whether all the stores of this region are too large. This is a size calculated using the getsizetocheck method. If the total size of the current store is greater than this value, this region needs to be split.
The getsizetocheck calculation method first checks whether tableregionscount is equal to 0. If so, hbase. hregion. Max. filesize is returned. If not, math. Min (getdesiredmaxfilesize () is calculated (),
This. flushsize * (tableregionscount * tableregionscount ).