When does hbase do minor major compact
We all know that the compact is divided into two categories, a class called minor compact, a class called Major compact,
What is the difference between the two?
The difference between the two is that the Minor compact is just a file merge operation, and the major compact deletes the delete item in addition to the file merge operation.
HBase in order to prevent small files (brush to disk menstore) too much, in order to ensure the efficiency of query, HBase needs to be when necessary to merge these small store file into a relatively large store file, this process is called compaction. In HBase, there are two main types of Compaction:minor compaction and major compaction.
The function of major compaction is to merge all store file into one, and the possible conditions for triggering major compaction are: Major_compact command, Majorcompact () API, Region Server Autorun (Related parameters: Hbase.hregion.majoucompaction default is 24 hours, hbase.hregion.majorcompaction.jetter default value is 0.2 prevent region server Major compaction at the same time). The function of the Hbase.hregion.majorcompaction.jetter parameter is to float the value specified by the parameter hbase.hregion.majoucompaction, assuming that two parameters are the default values 24 and 0, 2, the major compact finally uses the following values: 19.2~28.8 this range.
The operation mechanism of minor compaction is more complicated, it is decided by several parameters together:
Hbase.hstore.compaction.min: The default value is 3, which means that minor compaction starts when it requires at least three store file that meets the criteria
The default value of Hbase.hstore.compaction.max is 10, which means that up to 10 store file is selected in minor compaction at a time
Hbase.hstore.compaction.min.size indicates that a store file with a size smaller than this value must be added to the minor compaction store file
Hbase.hstore.compaction.max.size indicates that a store file larger than this value must be minor compaction excluded
Hbase.hstore.compaction.ratio the store file by file age (older to younger), minor compaction always starts from the older store file, If the size of the file is less than the sum of the Hbase.hstore.compaction.max store file size after it is multiplied by the ratio, the store file is also added to the minor compaction.
If the minor compaction process still do not understand, you can go to hbase in about minor compaction source code, or: http://www.linuxidc.com/Linux/2013-05/83675.htm
This article is from the Linux commune website (www.linuxidc.com) Source Link: http://www.linuxidc.com/Linux/2013-05/83674.htm
When does hbase make minor major compact