[
https://issues.apache.org/jira/browse/HBASE-10137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13849040#comment-13849040
]
rajeshbabu commented on HBASE-10137:
------------------------------------
@Ram,
bq. But after disabled had happened before enabling, if a REgion server goes
down and going with retainAssignment? how would this work? META may have the
dead RS entry but the servermanager won't be giving the old ones. Will this be
handled here?
If a region server is dead and no new RS started in the same host, then
randomly one server from online servers(list from server manager) will be
selected for the region. Its fine only.
{code}
if (localServers.isEmpty()) {
// No servers on the new cluster match up with this hostname,
// assign randomly.
ServerName randomServer = servers.get(RANDOM.nextInt(servers.size()));
assignments.get(randomServer).add(region);
numRandomAssignments++;
{code}
> GeneralBulkAssigner with retain assignment plan can be used in
> EnableTableHandler to bulk assign the regions
> ------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-10137
> URL: https://issues.apache.org/jira/browse/HBASE-10137
> Project: HBase
> Issue Type: Bug
> Components: Region Assignment
> Affects Versions: 0.96.0, 0.94.14
> Reporter: rajeshbabu
> Assignee: rajeshbabu
> Fix For: 0.98.0, 0.96.2, 0.99.0
>
> Attachments: HBASE-10137.patch
>
>
> Current in BulkEnabler we are assigning one region at a time, instead we can
> use GeneralBulkAssigner to bulk assign multiple regions at a time.
> {code}
> for (HRegionInfo region : regions) {
> if (assignmentManager.getRegionStates()
> .isRegionInTransition(region)) {
> continue;
> }
> final HRegionInfo hri = region;
> pool.execute(Trace.wrap("BulkEnabler.populatePool",new Runnable() {
> public void run() {
> assignmentManager.assign(hri, true);
> }
> }));
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)