[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Purtell updated HBASE-18602: --- Fix Version/s: (was: 1.5.0) > 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, 1.4.0 > > Attachments: HBASE-18602-master-v1.patch, > HBASE-18602-master-v2.patch, HBASE-18602-master-v3.patch, > HBASE-18602-master-v3.patch, HBASE-18602-master-v3.patch, > HBASE-18602-master-v4.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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Resolution: Fixed Hadoop Flags: Reviewed Status: Resolved (was: Patch Available) Push to master, branch-2, branch-1, and branch-1.4. Thanks for the contribution. [~suxingfate] > 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, 1.4.0, 1.5.0 > > Attachments: HBASE-18602-master-v1.patch, > HBASE-18602-master-v2.patch, HBASE-18602-master-v3.patch, > HBASE-18602-master-v3.patch, HBASE-18602-master-v3.patch, > HBASE-18602-master-v4.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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Fix Version/s: 1.5.0 1.4.0 > 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, 1.4.0, 1.5.0 > > Attachments: HBASE-18602-master-v1.patch, > HBASE-18602-master-v2.patch, HBASE-18602-master-v3.patch, > HBASE-18602-master-v3.patch, HBASE-18602-master-v3.patch, > HBASE-18602-master-v4.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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Patch Available (was: Open) > 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, HBASE-18602-master-v3.patch, > HBASE-18602-master-v4.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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Attachment: HBASE-18602-master-v4.patch > 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, HBASE-18602-master-v3.patch, > HBASE-18602-master-v4.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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Open (was: Patch Available) > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Patch Available (was: Open) retry > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Open (was: Patch Available) > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Status: Open (was: Patch Available) > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Attachment: HBASE-18602-master-v3.patch retry v3 > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Status: Patch Available (was: Open) > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Patch Available (was: Open) > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Status: Open (was: Patch Available) HBASE-18359 has been resolved. retry > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Attachment: HBASE-18602-master-v3.patch > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chia-Ping Tsai updated HBASE-18602: --- Fix Version/s: 2.0.0 > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Attachment: HBASE-18602-master-v3.patch resubmit patch to trigger jenkins > 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, 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Patch Available (was: Open) > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Open (was: Patch Available) > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Open (was: Patch Available) > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Status: Patch Available (was: Open) > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Attachment: HBASE-18602-master-v2.patch rebased code to latest master > 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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-18602: --- Status: Patch Available (was: Open) > 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 >Priority: Minor > Attachments: HBASE-18602-master-v1.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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Affects Version/s: (was: 2.0.0-alpha-1) > 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 >Priority: Minor > Attachments: HBASE-18602-master-v1.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 MapcorrectAssignments( >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)
[jira] [Updated] (HBASE-18602) rsgroup cleanup unassign code
[ https://issues.apache.org/jira/browse/HBASE-18602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wang, Xinglong updated HBASE-18602: --- Attachment: HBASE-18602-master-v1.patch > rsgroup cleanup unassign code > - > > Key: HBASE-18602 > URL: https://issues.apache.org/jira/browse/HBASE-18602 > Project: HBase > Issue Type: Improvement > Components: rsgroup >Affects Versions: 2.0.0-alpha-1 >Reporter: Wang, Xinglong >Priority: Minor > Attachments: HBASE-18602-master-v1.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 MapcorrectAssignments( >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)