hbase region split :
split执行调用流程:
1.HbaseAdmin发起split:###
2.RSRpcServices实现类执行split(Implements the regionserver RPC services.)###
3.CompactSplitThread类与SplitRequest类用来执行region切割:###
4.splitRequest执行doSplitting操作###
4.1初始化两个子region###
4.2执行切割####
4.2.1:(创建子region。stepsBeforePONR函数)#####
4.2.2:子region执行:stepsAfterPONR函数执行(包含openDaughters函数):#####
4.2.3:HRegionServer添加子region到meta表,加入RegionServer#####
4.3等待region切分完成,修改meta表信息,报告master####
1.HbaseAdmin发起split:
public void split(final TableName tableName) throws IOException {
split(tableName, null);
}
public void split(final ServerName sn, final HRegionInfo hri,
byte[] splitPoint) throws IOException {
if (hri.getStartKey() != null && splitPoint != null &&
Bytes.compareTo(hri.getStartKey(), splitPoint) == 0) {
throw new IOException("should not give a splitkey which equals to startkey!");
}
// TODO: There is no timeout on this controller. Set one!
HBaseRpcController controller = rpcControllerFactory.newController();
controller.setPriority(hri.getTable());
// TODO: this d