You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Yi Liang (JIRA)" <ji...@apache.org> on 2017/06/09 17:54:18 UTC

[jira] [Commented] (HBASE-18105) [AMv2] Split/Merge need cleanup; currently they diverge and do not fully embrace AMv2 world

    [ https://issues.apache.org/jira/browse/HBASE-18105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16044765#comment-16044765 ] 

Yi Liang commented on HBASE-18105:
----------------------------------

Hi [~stack], I just review  the code of SplitProcedure and MergeProcedure,  and get a little confused with your description, below is what I found

Execution path For MergeProcedure:
1. HBaseAdmin.mergeRegionsAsync -> MasterKeepAliveConnection.mergeTableRegions -> MasterRpcServices.mergeTableRegions -> HMaster.mergeRegions -> MasterProcedureUtil.submitProcedure 
//this path is totally on master side. client send rpc request to master, and master submit procedures. 

2. HMaster.dispatchMergingRegions -> DispatchMergingRegionsProcedure.doMergeInRS -> SeverManager.sendRegionsMerge -> ProtobufUtil.mergeRegions -> AdminService.BlockingInterface.mergeRegions -> RSRpcService.mergeRegions -> CompactSplitThread.requestRegionsMerge -> RegionMergeRequest.requestRegionMerge ->  Send the merge request to the master -> AssignmentManager.submitProcedure
//this path start from Master and go to RSRpcService, and at last send the RPC request again back to master.
//I saw your comment on remove RegionMergeRequest on Path 2, so do you mean skip the RS side, all this should help within Master?

Execution path For SplitProcedure: . 
1. HBaseAdmin.splitRegion -> ProtobufUtil.split -> AdminService.BlockingInterface.splitRegion -> RSRpcServices.splitRegion -> CompactSplitThread.requestSplit -> SplitRequest.requestRegionSplit -> Send the split request to the master -> AssignmentManager.submitProcedure
// This path is similar to path2 above, it should be same Path1 in Merge, It is wired that even in HBaseAdmin, the RPC request will first send to RSRpcSevices and then send it maste. This is what you mean  "we ask the Master which asks the RS, which turns around, and asks the Master to run the operation." 

Besides above path, every Procedure has another similar path, but that path happens only on master, so I just skip them.

If I understand correctly, I will change the logic as below
For MergeProcedure, the only thing need to change is on path2, remove RegionMergeRequest, make it happen all on master
For SplitProcedure, this is a strange path, i will make it same as path 1 of MergeProcedure, HBaseAdmin will call MasterRPCservice directly. 

Correct me if I misunderstand something.  And Do you mind me to create some sub jiras for this, so I can change them step by step. 


> [AMv2] Split/Merge need cleanup; currently they diverge and do not fully embrace AMv2 world
> -------------------------------------------------------------------------------------------
>
>                 Key: HBASE-18105
>                 URL: https://issues.apache.org/jira/browse/HBASE-18105
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Region Assignment
>    Affects Versions: 2.0.0
>            Reporter: stack
>             Fix For: 2.0.0
>
>
> Region Split and Merge work on the new AMv2 but they work differently. This issue is about bringing them back together and fully embracing the AMv2 program.
> They both have issues mostly the fact that they carry around baggage no longer necessary in the new world of assignment.
> Here are some of the items:
> Split and Merge metadata modifications are done by the Master now but we have vestige of Split/Merge on RS still; e.g. when we SPLIT, we ask the Master which asks the RS, which turns around, and asks the Master to run the operation. Fun. MERGE is all done Master-side.
>  
> Clean this up. Remove asking RS to run SPLIT and remove RegionMergeRequest, etc. on RS-side. Also remove PONR. We don’t Points-Of-No-Return now we are up on Pv2. Remove all calls in Interfaces; they are unused. Make RS still able to detect when split, but have it be a client of Master like anyone else.
> Split is Async but does not return procId
> Split is async. Doesn’t return the procId though. Merge does. Fix. Only hard part here I think is the Admin API does not allow procid return.
> Flags
> Currently OFFLINE is determined by looking either at the master instance of HTD (isOffline) and/or at the RegionState#state. Ditto for SPLIT. For MERGE, we rely on RegionState#state. Related is a note above on how split works -- there is a split flag in HTD when there should not be.
>  
> TODO is move to rely on RegionState#state exclusively in Master.
> From Split/Merge Procedures need finishing in https://docs.google.com/document/d/1eVKa7FHdeoJ1-9o8yZcOTAQbv0u0bblBlCCzVSIn69g/edit#heading=h.4b60dc1h4m1f



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)