region split流程分析

2021-09-01 23:32:11 字數 1596 閱讀 7119

region split流程分析

split region的發起主要通過client端呼叫regionserver.splitregion或memstore.flsuh時檢查並發起。

client通過rpc呼叫regionserver的splitregion方法

client端通過hbaseadmin.split傳入region name與split point(切分的rowkey,可以不傳入),

通過meta得到此region所在的server,發起rpc請求,呼叫hregionserver.splitregion方法

public splitregionresponse splitregion(final rpccontroller controller,

final splitregionrequest request) throws serviceexception catch (ioexception ie) catch (rejectedexecutionexception ree) catch (ioexception ex) catch (exception e) else catch (runtimeexception ee) catch (ioexception ex) finally catch (ioexception io) else if (shouldcompact) {

server.compactsplitthread.requestsystemcompaction(

region, thread.currentthread().getname());

...............................................此處省去一些**

return true;

public synchronized boolean requestsplit(final hregion r) {

// don't split regions that are blocking

a.檢查hbase.regionserver.regionsplitlimit配置的split limit是否大於rs中的onlineregions的個數

如果不想做split操作,可以把此值設定為乙個較小的值,比如1

b.迭代region下的所有store,檢查hbase.hstore.blockingstorefiles配置的store的檔案個數,預設為7

減去store中所有的storefile的個是是否大於或等於store.priority_user(1)

if (shouldsplitregion() && r.getcompactpriority() >= store.priority_user) {

如果需要做split操作,得到split的key,此時預設從最大的storefile的中間key開始split

byte midkey = r.checksplit();

if (midkey != null) {

發起split request,見compactsplitthread.requestsplit(region,rowkey)流程

requestsplit(r, midkey);

return true;

return false;

kernel power off流程分析

凡是 linux 核心上層關機時,底層均會調到 kernel power off 電腦可以使用按鍵 ctr alt del 鍵進入關機,下面我們看看 流程 syscall define4 kernel power off pm power off prepare machine power off ...

UBoot流程分析

uboot程式分析 程式入口分析 第一階段bl1程式分析 第二階段bl2程式分析 解壓uboot原始碼,開啟頂層makefile,每個uboot所支援的開發板在makefile中都會有乙個配置選項,在e uboot board samsung smdk2440,有乙個uboot.lds鏈結器指令碼檔...

miRNA seq分析流程

mirna 是生物中非常重要的一類非編碼小 rna,其在生物體的調控中具有非常重要的作用,在人中大約三分之一的基因受到 mirna 的調控。對於 mirna 轉錄後調控的分析也越來越多。那麼拿到一組 mirna 測序的資料之後我們進行怎樣的分析呢?第一,對於所有的測序資料,我們都要進行質量的檢測,這...