[
https://issues.apache.org/jira/browse/HBASE-12122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14157001#comment-14157001
]
stack commented on HBASE-12122:
-------------------------------
Only meta table needs this treatment below? Not namespace table?
1273 RegionStates regionStates =
master.assignmentManager.getRegionStates();
1274 if (!(TableName.META_TABLE_NAME.equals(tableName)
1275 &&
regionStates.getRegionState(HRegionInfo.FIRST_META_REGIONINFO) != null)
1276 && !master.assignmentManager.isFailoverCleanupDone()) {
When this is called, assignMasterRegions, I don't see checks for if master is
supposed to host region or not? Should there be a check here? Or it happens
higher up?
Is this code duplicated?
1201 Map<ServerName, List<HRegionInfo>> assignments
1202 = assignMasterRegions(regions.keySet(), servers);
1203 if (assignments != null && !assignments.isEmpty()) {
1204 servers = new ArrayList<ServerName>(servers);
1205 // Guarantee not to put other regions on master
1206 servers.remove(masterServerName);
1207 List<HRegionInfo> masterRegions =
assignments.get(masterServerName);
1208 if (!masterRegions.isEmpty()) {
1209 regions = new HashMap<HRegionInfo, ServerName>(regions);
1210 for (HRegionInfo region: masterRegions) {
1211 regions.remove(region);
1212 }
1213 }
1214 }
Looks like lots of nice cleanup of special-casing for master.
You think it will help w/ some of our test failures?
Thanks [~jxiang]
> Try not to assign user regions to master all the time
> -----------------------------------------------------
>
> Key: HBASE-12122
> URL: https://issues.apache.org/jira/browse/HBASE-12122
> Project: HBase
> Issue Type: Bug
> Reporter: Jimmy Xiang
> Assignee: Jimmy Xiang
> Priority: Minor
> Fix For: 2.0.0, 0.99.1
>
> Attachments: hbase-12122.patch, hbase-12122_v2.patch
>
>
> Load balancer does a good job not to assign regions of tables not configured
> to put on the active master. However, if there is no other region server, it
> still assigns users regions to the master. This happens when all normal
> region servers are crashed and recovering.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)