Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EDC89200D23 for ; Thu, 19 Oct 2017 15:36:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EC260160BEC; Thu, 19 Oct 2017 13:36:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3EDBD1609E2 for ; Thu, 19 Oct 2017 15:36:04 +0200 (CEST) Received: (qmail 70057 invoked by uid 500); 19 Oct 2017 13:36:03 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 70046 invoked by uid 99); 19 Oct 2017 13:36:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Oct 2017 13:36:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 914F8C2E2D for ; Thu, 19 Oct 2017 13:36:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 1RFn3rg1G6CF for ; Thu, 19 Oct 2017 13:36:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 6C03A5FBE5 for ; Thu, 19 Oct 2017 13:36:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id DF997E0F3B for ; Thu, 19 Oct 2017 13:36:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 529C921EEA for ; Thu, 19 Oct 2017 13:36:00 +0000 (UTC) Date: Thu, 19 Oct 2017 13:36:00 +0000 (UTC) From: "Hadoop QA (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-18602) rsgroup cleanup unassign code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 19 Oct 2017 13:36:05 -0000 [ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16211053#comment-16211053 ] 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} 3m 7s{color} | {color:red} Docker failed to build yetus/hbase:4a7b430. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-18602 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12892780/HBASE-18602-master-v3.patch | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/9215/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 > Fix For: 2.0.0 > > Attachments: HBASE-18602-master-v1.patch, HBASE-18602-master-v2.patch, HBASE-18602-master-v3.patch, HBASE-18602-master-v3.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> correctAssignments( > Map> existingAssignments) > throws HBaseIOException{ > Map> correctAssignments = new TreeMap<>(); > List misplacedRegions = new LinkedList<>(); > correctAssignments.put(LoadBalancer.BOGUS_SERVER_NAME, new LinkedList<>()); > for (Map.Entry> assignments : existingAssignments.entrySet()){ > ServerName sName = assignments.getKey(); > correctAssignments.put(sName, new LinkedList<>()); > List 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)