[
https://issues.apache.org/jira/browse/HBASE-6016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276743#comment-13276743
]
chunhui shen commented on HBASE-6016:
-------------------------------------
@rajeshbabu
When master startup after restart,
We will do the following:
AssignmentManager#joinCluster
->
AssignmentManager#processDeadServersAndRegionsInTransition
->
ZKUtil.listChildrenAndWatchForNewChildren(watcher,
watcher.assignmentZNode);
AssignmentManager#processDeadServersAndRecoverLostRegions(deadServers, nodes);
the M_ZK_REGION_CLOSING or RS_ZK_REGION_CLOSED znode will be handled by
->
AssignmentManager#processRegionsInTransition
{code}
case M_ZK_REGION_CLOSING:
// If zk node of the region was updated by a live server skip this
// region and just add it into RIT.
if (isOnDeadServer(regionInfo, deadServers) && (sn == null ||
!isServerOnline(sn))) {
// If was on dead server, its closed now. Force to OFFLINE and this
// will get it reassigned if appropriate
forceOffline(regionInfo, rt);
} else {
// Just insert region into RIT.
// If this never updates the timeout will trigger new assignment
regionsInTransition.put(encodedRegionName,
getRegionState(regionInfo, RegionState.State.CLOSING, rt));
}
failoverProcessedRegions.put(encodedRegionName, regionInfo);
break;
case RS_ZK_REGION_CLOSED:
case RS_ZK_REGION_FAILED_OPEN:
// Region is closed, insert into RIT and handle it
addToRITandCallClose(regionInfo, RegionState.State.CLOSED, rt);
failoverProcessedRegions.put(encodedRegionName, regionInfo);
break;
{code}
->AssignmentManager#addToRITandCallClose
So, we will close this region at last.
Thanks for the review, correct me if wrong.
> ServerShutdownHandler#processDeadRegion could return false for disabling
> table regions
> --------------------------------------------------------------------------------------
>
> Key: HBASE-6016
> URL: https://issues.apache.org/jira/browse/HBASE-6016
> Project: HBase
> Issue Type: Bug
> Components: master
> Reporter: chunhui shen
> Assignee: chunhui shen
> Attachments: HBASE-6016.patch
>
>
> {code}
> * @return Returns true if specified region should be assigned, false if
> not.
> * @throws IOException
> */
> public static boolean processDeadRegion(HRegionInfo hri, Result result,
> AssignmentManager assignmentManager, CatalogTracker catalogTracker)
> {code}
> For the disabling region, I think we needn't assign it , and
> processDeadRegion could return false.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira