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

chenxu commented on HBASE-6721:
-------------------------------

{code:title=RSGroupBasedLoadBalancer.roundRobinAssignment|borderStyle=solid}
  ...
  for(String groupKey : regionMap.keySet()) {
    if (regionMap.get(groupKey).size() > 0) {
      Map<ServerName, List<HRegionInfo>> result =
      this.internalBalancer.roundRobinAssignment(
        regionMap.get(groupKey),
        serverMap.get(groupKey));
      if(result != null) {
        assignments.putAll(result);
      }
    }
  }
  ...
{code}
if two group both has BOGUS_SERVER_NAME,  assignments.putAll may be not right

{code:title=RSGroupBasedLoadBalancer.randomAssignment|borderStyle=solid}
public ServerName randomAssignment(HRegionInfo region,
  List<ServerName> servers) throws HBaseIOException {
  ListMultimap<String,HRegionInfo> regionMap = LinkedListMultimap.create();
  ListMultimap<String,ServerName> serverMap = LinkedListMultimap.create();
  generateGroupMaps(Lists.newArrayList(region), servers, regionMap, serverMap);
  List<ServerName> filteredServers = 
serverMap.get(regionMap.keySet().iterator().next());
  return this.internalBalancer.randomAssignment(region, filteredServers);
}
{code}
if internalBalancer.randomAssignment return BOGUS_SERVER_NAME, how does AM work?
I think we shoud return null instead of BOGUS_SERVER_NAME

> RegionServer Group based Assignment
> -----------------------------------
>
>                 Key: HBASE-6721
>                 URL: https://issues.apache.org/jira/browse/HBASE-6721
>             Project: HBase
>          Issue Type: New Feature
>          Components: regionserver
>            Reporter: Francis Liu
>            Assignee: Francis Liu
>              Labels: hbase-6721
>             Fix For: 2.0.0
>
>         Attachments: 6721-master-webUI.patch, balanceCluster Sequence 
> Diagram.svg, HBASE-6721_0.98_2.patch, HBASE-6721_10.patch, 
> HBASE-6721_11.patch, HBASE-6721_12.patch, HBASE-6721_13.patch, 
> HBASE-6721_14.patch, HBASE-6721_15.patch, HBASE-6721_8.patch, 
> HBASE-6721_94_2.patch, HBASE-6721_94_3.patch, HBASE-6721_94_3.patch, 
> HBASE-6721_94_4.patch, HBASE-6721_94_5.patch, HBASE-6721_94_6.patch, 
> HBASE-6721_94_7.patch, HBASE-6721_94.patch, HBASE-6721_94.patch, 
> HBASE-6721_98_1.patch, HBASE-6721_98_2.patch, HBASE-6721_9.patch, 
> HBASE-6721_9.patch, HBASE-6721-DesigDoc.pdf, HBASE-6721-DesigDoc.pdf, 
> HBASE-6721-DesigDoc.pdf, HBASE-6721-DesigDoc.pdf, HBASE-6721 
> GroupBasedLoadBalancer Sequence Diagram.xml, 
> HBASE-6721_hbase-6721_addendum.patch, HBASE-6721_trunk1.patch, 
> HBASE-6721_trunk2.patch, HBASE-6721_trunk.patch, HBASE-6721_trunk.patch, 
> HBASE-6721_trunk.patch, hbase-6721-v15-branch-1.1.patch, 
> hbase-6721-v16.patch, hbase-6721-v17.patch, hbase-6721-v18.patch, 
> hbase-6721-v19.patch, hbase-6721-v20.patch, hbase-6721-v21.patch, 
> hbase-6721-v22.patch, hbase-6721-v23.patch, hbase-6721-v25.patch, 
> hbase-6721-v26_draft1.patch, hbase-6721-v26.patch, hbase-6721-v27.patch, 
> hbase-6721-v27.patch, hbase-6721-v27.patch.txt, hbase-6721-v28.patch, 
> hbase-6721-v28.patch, hbase-6721-v29.patch, immediateAssignments Sequence 
> Diagram.svg, randomAssignment Sequence Diagram.svg, retainAssignment Sequence 
> Diagram.svg, roundRobinAssignment Sequence Diagram.svg
>
>
> In multi-tenant deployments of HBase, it is likely that a RegionServer will 
> be serving out regions from a number of different tables owned by various 
> client applications. Being able to group a subset of running RegionServers 
> and assign specific tables to it, provides a client application a level of 
> isolation and resource allocation.
> The proposal essentially is to have an AssignmentManager which is aware of 
> RegionServer groups and assigns tables to region servers based on groupings. 
> Load balancing will occur on a per group basis as well. 
> This is essentially a simplification of the approach taken in HBASE-4120. See 
> attached document.



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

Reply via email to