hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18602) rsgroup cleanup unassign code
Date Fri, 13 Oct 2017 03:04:00 GMT

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

Hadoop QA commented on HBASE-18602:
-----------------------------------

| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m  0s{color} | {color:blue}
Docker mode activated. {color} |
| {color:red}-1{color} | {color:red} docker {color} | {color:red}  0m 13s{color} | {color:red}
Docker failed to build yetus/hbase:5d60123. {color} |
\\
\\
|| Subsystem || Report/Notes ||
| JIRA Issue | HBASE-18602 |
| JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12891962/HBASE-18602-master-v2.patch
|
| Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/9088/console |
| Powered by | Apache Yetus 0.4.0   http://yetus.apache.org |


This message was automatically generated.



> rsgroup cleanup unassign code
> -----------------------------
>
>                 Key: HBASE-18602
>                 URL: https://issues.apache.org/jira/browse/HBASE-18602
>             Project: HBase
>          Issue Type: Improvement
>          Components: rsgroup
>            Reporter: Wang, Xinglong
>            Assignee: Wang, Xinglong
>            Priority: Minor
>         Attachments: HBASE-18602-master-v1.patch, HBASE-18602-master-v2.patch
>
>
> While walking through rsgroup code, I found that variable misplacedRegions has never
been added any element into. This makes the unassign region code is not functional. And according
to my test, it is actually unnecessary to do that.
> RSGroupBasedLoadBalancer.java
> {code:java}
> private Map<ServerName, List<HRegionInfo>> correctAssignments(
>        Map<ServerName, List<HRegionInfo>> existingAssignments)
>   throws HBaseIOException{
>     Map<ServerName, List<HRegionInfo>> correctAssignments = new TreeMap<>();
>     List<HRegionInfo> misplacedRegions = new LinkedList<>();
>     correctAssignments.put(LoadBalancer.BOGUS_SERVER_NAME, new LinkedList<>());
>     for (Map.Entry<ServerName, List<HRegionInfo>> assignments : existingAssignments.entrySet()){
>       ServerName sName = assignments.getKey();
>       correctAssignments.put(sName, new LinkedList<>());
>       List<HRegionInfo> regions = assignments.getValue();
>       for (HRegionInfo region : regions) {
>         RSGroupInfo info = null;
>         try {
>           info = rsGroupInfoManager.getRSGroup(
>               rsGroupInfoManager.getRSGroupOfTable(region.getTable()));
>         } catch (IOException exp) {
>           LOG.debug("RSGroup information null for region of table " + region.getTable(),
>               exp);
>         }
>         if ((info == null) || (!info.containsServer(sName.getAddress()))) {
>           correctAssignments.get(LoadBalancer.BOGUS_SERVER_NAME).add(region);
>         } else {
>           correctAssignments.get(sName).add(region);
>         }
>       }
>     }
>     //TODO bulk unassign?
>     //unassign misplaced regions, so that they are assigned to correct groups.
>     for(HRegionInfo info: misplacedRegions) {
>       try {
>         this.masterServices.getAssignmentManager().unassign(info);
>       } catch (IOException e) {
>         throw new HBaseIOException(e);
>       }
>     }
>     return correctAssignments;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message