这个需要看源码,Hmaster是否负责不清楚,但是HRegionServer肯定是参与的。不出意外的应该是由HRegionServer完成的。
在HRegionServer内部,它定义了一个CompactSplitThread类型的成员变量compactSplitThread,单看字面意思,这就是一个合并分裂线程.
看下CompactSplitThread中都定义可哪些变量,如下:
[mw_shl_code=java,true]
// Configuration key for the large compaction threads.
// large合并线程数参数hbase.regionserver.thread.compaction.large,默认值为1
public final static String LARGE_COMPACTION_THREADS =
"hbase.regionserver.thread.compaction.large";
public final static int LARGE_COMPACTION_THREADS_DEFAULT = 1;
// Configuration key for the small compaction threads.
// small合并线程数参数hbase.regionserver.thread.compaction.small,默认值为1
public final static String SMALL_COMPACTION_THREADS =
"hbase.regionserver.thread.compaction.small";
public final static int SMALL_COMPACTION_THREADS_DEFAULT = 1;
// Configuration key for split threads
// 分裂线程数参数hbase.regionserver.thread.split,默认值为1
public final static String SPLIT_THREADS = "hbase.regionserver.thread.split";
public final static int SPLIT_THREADS_DEFAULT = 1;
// Configuration keys for merge threads
// merge合并线程数参数hbase.regionserver.thread.merge,默认值为1
public final static String MERGE_THREADS = "hbase.regionserver.thread.merge";
public final static int MERGE_THREADS_DEFAULT = 1;
// Region分分裂的限制
public static final String REGION_SERVER_REGION_SPLIT_LIMIT =
"hbase.regionserver.regionSplitLimit";
// Region分分裂的限制默认值,为1000
public static final int DEFAULT_REGION_SERVER_REGION_SPLIT_LIMIT= 1000;
// HRegionServer实例server
private final HRegionServer server;
// Configuration配置实例conf
private final Configuration conf;
// long合并线程池longCompactions
private final ThreadPoolExecutor longCompactions;
// short合并线程池shortCompactions
private final ThreadPoolExecutor shortCompactions;
// 分裂线程池splits
private final ThreadPoolExecutor splits;
// merge合并线程池mergePool
private final ThreadPoolExecutor mergePool;
/**
* Splitting should not take place if the total number of regions exceed this.
* 如果region的总数超过这个限制,split就不应该发生。
* This is not a hard limit to the number of regions but it is a guideline to
* stop splitting after number of online regions is greater than this.
* 这不是一个硬性的Region数目的限制,但是如果在线region的数目超过此限制它会是一个停止split的指南。
*/
private int regionSplitLimit;[/mw_shl_code]